| 1 |
/* |
|---|
| 2 |
+----------------------------------------------------------------------+ |
|---|
| 3 |
| eAccelerator project | |
|---|
| 4 |
+----------------------------------------------------------------------+ |
|---|
| 5 |
| Copyright (c) 2004 - 2005 eAccelerator | |
|---|
| 6 |
| http://eaccelerator.net | |
|---|
| 7 |
+----------------------------------------------------------------------+ |
|---|
| 8 |
| This program is free software; you can redistribute it and/or | |
|---|
| 9 |
| modify it under the terms of the GNU General Public License | |
|---|
| 10 |
| as published by the Free Software Foundation; either version 2 | |
|---|
| 11 |
| of the License, or (at your option) any later version. | |
|---|
| 12 |
| | |
|---|
| 13 |
| This program is distributed in the hope that it will be useful, | |
|---|
| 14 |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|---|
| 15 |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|---|
| 16 |
| GNU General Public License for more details. | |
|---|
| 17 |
| | |
|---|
| 18 |
| You should have received a copy of the GNU General Public License | |
|---|
| 19 |
| along with this program; if not, write to the Free Software | |
|---|
| 20 |
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, | |
|---|
| 21 |
| MA 02111-1307, USA. | |
|---|
| 22 |
| | |
|---|
| 23 |
| A copy is availble at http://www.gnu.org/copyleft/gpl.txt | |
|---|
| 24 |
+----------------------------------------------------------------------+ |
|---|
| 25 |
| Author(s): Dmitry Stogov <dstogov@users.sourceforge.net> | |
|---|
| 26 |
| Seung Woo <segv@sayclub.com> | |
|---|
| 27 |
| Everaldo Canuto <everaldo_canuto@yahoo.com.br> | |
|---|
| 28 |
+----------------------------------------------------------------------+ |
|---|
| 29 |
$Id$ |
|---|
| 30 |
*/ |
|---|
| 31 |
|
|---|
| 32 |
#include "eaccelerator.h" |
|---|
| 33 |
|
|---|
| 34 |
#ifdef HAVE_EACCELERATOR |
|---|
| 35 |
|
|---|
| 36 |
#include "ea_store.h" |
|---|
| 37 |
#include "debug.h" |
|---|
| 38 |
|
|---|
| 39 |
/******************************************************************************/ |
|---|
| 40 |
/* Functions to calculate the size of different structure that a compiled php */ |
|---|
| 41 |
/* script contains. */ |
|---|
| 42 |
/******************************************************************************/ |
|---|
| 43 |
|
|---|
| 44 |
#ifndef DEBUG |
|---|
| 45 |
inline |
|---|
| 46 |
#endif |
|---|
| 47 |
static void calc_string(char *str, int len TSRMLS_DC) |
|---|
| 48 |
{ |
|---|
| 49 |
if (len > MAX_DUP_STR_LEN || zend_hash_add(&EAG(strings), str, len, |
|---|
| 50 |
&str, sizeof(char *), |
|---|
| 51 |
NULL) == SUCCESS) { |
|---|
| 52 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 53 |
EAG(mem) += len; |
|---|
| 54 |
} |
|---|
| 55 |
} |
|---|
| 56 |
|
|---|
| 57 |
typedef void (*calc_bucket_t) (void *TSRMLS_DC); |
|---|
| 58 |
|
|---|
| 59 |
#define calc_hash_ex(from, start, calc_bucket) \ |
|---|
| 60 |
calc_hash_int(from, start, calc_bucket TSRMLS_CC) |
|---|
| 61 |
|
|---|
| 62 |
#define calc_hash(from, calc_bucket) \ |
|---|
| 63 |
calc_hash_ex(from, (from)->pListHead, calc_bucket) |
|---|
| 64 |
|
|---|
| 65 |
#define calc_zval_hash(from) \ |
|---|
| 66 |
calc_hash(from, (calc_bucket_t)calc_zval_ptr) |
|---|
| 67 |
|
|---|
| 68 |
#define calc_zval_hash_ex(from, start) \ |
|---|
| 69 |
calc_hash_ex(from, start, (calc_bucket_t)calc_zval_ptr) |
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 |
static void calc_zval_ptr(zval ** from TSRMLS_DC) |
|---|
| 73 |
{ |
|---|
| 74 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 75 |
EAG(mem) += sizeof(zval); |
|---|
| 76 |
calc_zval(*from TSRMLS_CC); |
|---|
| 77 |
} |
|---|
| 78 |
|
|---|
| 79 |
#ifdef ZEND_ENGINE_2 |
|---|
| 80 |
static void calc_property_info(zend_property_info * from TSRMLS_DC) |
|---|
| 81 |
{ |
|---|
| 82 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 83 |
EAG(mem) += sizeof(zend_property_info); |
|---|
| 84 |
calc_string(from->name, from->name_length + 1 TSRMLS_CC); |
|---|
| 85 |
} |
|---|
| 86 |
|
|---|
| 87 |
/* Calculate the size of a point to a class entry */ |
|---|
| 88 |
static void calc_class_entry_ptr(zend_class_entry ** from TSRMLS_DC) |
|---|
| 89 |
{ |
|---|
| 90 |
calc_class_entry(*from TSRMLS_CC); |
|---|
| 91 |
} |
|---|
| 92 |
#endif |
|---|
| 93 |
|
|---|
| 94 |
/* Calculate the size of an HashTable */ |
|---|
| 95 |
static void calc_hash_int(HashTable * source, Bucket * start, |
|---|
| 96 |
calc_bucket_t calc_bucket TSRMLS_DC) |
|---|
| 97 |
{ |
|---|
| 98 |
Bucket *p; |
|---|
| 99 |
|
|---|
| 100 |
if (source->nNumOfElements > 0) { |
|---|
| 101 |
if (!EAG(compress)) { |
|---|
| 102 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 103 |
EAG(mem) += source->nTableSize * sizeof(Bucket *); |
|---|
| 104 |
} |
|---|
| 105 |
p = start; |
|---|
| 106 |
while (p) { |
|---|
| 107 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 108 |
EAG(mem) += offsetof(Bucket, arKey) + p->nKeyLength; |
|---|
| 109 |
calc_bucket(p->pData TSRMLS_CC); |
|---|
| 110 |
p = p->pListNext; |
|---|
| 111 |
} |
|---|
| 112 |
} |
|---|
| 113 |
} |
|---|
| 114 |
|
|---|
| 115 |
void calc_zval(zval * zv TSRMLS_DC) |
|---|
| 116 |
{ |
|---|
| 117 |
switch (zv->type & ~IS_CONSTANT_INDEX) { |
|---|
| 118 |
case IS_CONSTANT: |
|---|
| 119 |
case IS_STRING: |
|---|
| 120 |
if (zv->value.str.val == NULL || zv->value.str.val == empty_string || zv->value.str.len == 0) { |
|---|
| 121 |
} else { |
|---|
| 122 |
calc_string(zv->value.str.val, zv->value.str.len + 1 TSRMLS_CC); |
|---|
| 123 |
} |
|---|
| 124 |
break; |
|---|
| 125 |
case IS_ARRAY: |
|---|
| 126 |
case IS_CONSTANT_ARRAY: |
|---|
| 127 |
if (zv->value.ht != NULL && zv->value.ht != &EG(symbol_table)) { |
|---|
| 128 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 129 |
EAG(mem) += sizeof(HashTable); |
|---|
| 130 |
calc_zval_hash(zv->value.ht); |
|---|
| 131 |
} |
|---|
| 132 |
break; |
|---|
| 133 |
case IS_OBJECT: |
|---|
| 134 |
#ifndef ZEND_ENGINE_2 |
|---|
| 135 |
if (zv->value.obj.ce != NULL) { |
|---|
| 136 |
zend_class_entry *ce = zv->value.obj.ce; |
|---|
| 137 |
if (!EAG(compress)) { |
|---|
| 138 |
ea_debug_error("[%d] EACCELERATOR can't cache objects\n", getpid()); |
|---|
| 139 |
zend_bailout(); |
|---|
| 140 |
} |
|---|
| 141 |
while (ce != NULL) { |
|---|
| 142 |
if (ce->type != ZEND_USER_CLASS && strcmp(ce->name, "stdClass") != 0) { |
|---|
| 143 |
ea_debug_error("[%d] EACCELERATOR can't cache objects\n", getpid()); |
|---|
| 144 |
zend_bailout(); |
|---|
| 145 |
} |
|---|
| 146 |
ce = ce->parent; |
|---|
| 147 |
} |
|---|
| 148 |
calc_string(zv->value.obj.ce->name, zv->value.obj.ce->name_length + 1 TSRMLS_CC); |
|---|
| 149 |
} |
|---|
| 150 |
if (zv->value.obj.properties != NULL) { |
|---|
| 151 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 152 |
EAG(mem) += sizeof(HashTable); |
|---|
| 153 |
calc_zval_hash(zv->value.obj.properties); |
|---|
| 154 |
} |
|---|
| 155 |
#endif |
|---|
| 156 |
return; |
|---|
| 157 |
case IS_RESOURCE: |
|---|
| 158 |
ea_debug_error("[%d] EACCELERATOR can't cache resources\n", getpid()); |
|---|
| 159 |
zend_bailout(); |
|---|
| 160 |
default: |
|---|
| 161 |
break; |
|---|
| 162 |
} |
|---|
| 163 |
} |
|---|
| 164 |
|
|---|
| 165 |
/* Calculate the size of an op_array */ |
|---|
| 166 |
void calc_op_array(zend_op_array * from TSRMLS_DC) |
|---|
| 167 |
{ |
|---|
| 168 |
zend_op *opline; |
|---|
| 169 |
zend_op *end; |
|---|
| 170 |
|
|---|
| 171 |
if (from->type == ZEND_INTERNAL_FUNCTION) { |
|---|
| 172 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 173 |
EAG(mem) += sizeof(zend_internal_function); |
|---|
| 174 |
} else if (from->type == ZEND_USER_FUNCTION) { |
|---|
| 175 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 176 |
EAG(mem) += sizeof(eaccelerator_op_array); |
|---|
| 177 |
} else { |
|---|
| 178 |
ea_debug_error("[%d] EACCELERATOR can't cache function \"%s\"\n", getpid(), from->function_name); |
|---|
| 179 |
zend_bailout(); |
|---|
| 180 |
} |
|---|
| 181 |
#ifdef ZEND_ENGINE_2 |
|---|
| 182 |
if (from->num_args > 0) { |
|---|
| 183 |
zend_uint i; |
|---|
| 184 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 185 |
EAG(mem) += from->num_args * sizeof(zend_arg_info); |
|---|
| 186 |
for (i = 0; i < from->num_args; i++) { |
|---|
| 187 |
if (from->arg_info[i].name) |
|---|
| 188 |
calc_string(from->arg_info[i].name, from->arg_info[i].name_len + 1 TSRMLS_CC); |
|---|
| 189 |
if (from->arg_info[i].class_name) |
|---|
| 190 |
calc_string(from->arg_info[i].class_name, from->arg_info[i].class_name_len + 1 TSRMLS_CC); |
|---|
| 191 |
} |
|---|
| 192 |
} |
|---|
| 193 |
#else |
|---|
| 194 |
if (from->arg_types != NULL) |
|---|
| 195 |
calc_string((char *) from->arg_types, (from->arg_types[0] + 1) * sizeof(zend_uchar) TSRMLS_CC); |
|---|
| 196 |
#endif |
|---|
| 197 |
if (from->function_name != NULL) |
|---|
| 198 |
calc_string(from->function_name, strlen(from->function_name) + 1 TSRMLS_CC); |
|---|
| 199 |
#ifdef ZEND_ENGINE_2 |
|---|
| 200 |
if (from->scope != NULL) { |
|---|
| 201 |
// HOESH: the same problem? |
|---|
| 202 |
Bucket *q = CG(class_table)->pListHead; |
|---|
| 203 |
while (q != NULL) { |
|---|
| 204 |
if (*(zend_class_entry **) q->pData == from->scope) { |
|---|
| 205 |
calc_string(q->arKey, q->nKeyLength TSRMLS_CC); |
|---|
| 206 |
break; |
|---|
| 207 |
} |
|---|
| 208 |
q = q->pListNext; |
|---|
| 209 |
} |
|---|
| 210 |
} |
|---|
| 211 |
#endif |
|---|
| 212 |
if (from->type == ZEND_INTERNAL_FUNCTION) |
|---|
| 213 |
return; |
|---|
| 214 |
|
|---|
| 215 |
if (from->opcodes != NULL) { |
|---|
| 216 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 217 |
EAG(mem) += from->last * sizeof(zend_op); |
|---|
| 218 |
|
|---|
| 219 |
opline = from->opcodes; |
|---|
| 220 |
end = opline + from->last; |
|---|
| 221 |
EAG(compress) = 0; |
|---|
| 222 |
for (; opline < end; opline++) { |
|---|
| 223 |
/* |
|---|
| 224 |
if (opline->result.op_type == IS_CONST) calc_zval(&opline->result.u.constant TSRMLS_CC); |
|---|
| 225 |
*/ |
|---|
| 226 |
if (opline->op1.op_type == IS_CONST) |
|---|
| 227 |
calc_zval(&opline->op1.u.constant TSRMLS_CC); |
|---|
| 228 |
if (opline->op2.op_type == IS_CONST) |
|---|
| 229 |
calc_zval(&opline->op2.u.constant TSRMLS_CC); |
|---|
| 230 |
} |
|---|
| 231 |
EAG(compress) = 1; |
|---|
| 232 |
} |
|---|
| 233 |
if (from->brk_cont_array != NULL) { |
|---|
| 234 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 235 |
EAG(mem) += sizeof(zend_brk_cont_element) * from->last_brk_cont; |
|---|
| 236 |
} |
|---|
| 237 |
#ifdef ZEND_ENGINE_2 |
|---|
| 238 |
/* HOESH: try & catch support */ |
|---|
| 239 |
if (from->try_catch_array != NULL) { |
|---|
| 240 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 241 |
EAG(mem) += sizeof(zend_try_catch_element) * from->last_try_catch; |
|---|
| 242 |
} |
|---|
| 243 |
#endif |
|---|
| 244 |
if (from->static_variables != NULL) { |
|---|
| 245 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 246 |
EAG(mem) += sizeof(HashTable); |
|---|
| 247 |
calc_zval_hash(from->static_variables); |
|---|
| 248 |
} |
|---|
| 249 |
if (from->filename != NULL) |
|---|
| 250 |
calc_string(from->filename, strlen(from->filename) + 1 TSRMLS_CC); |
|---|
| 251 |
#ifdef ZEND_ENGINE_2 |
|---|
| 252 |
if (from->doc_comment != NULL) |
|---|
| 253 |
calc_string(from->doc_comment, from->doc_comment_len + 1 TSRMLS_CC); |
|---|
| 254 |
#endif |
|---|
| 255 |
} |
|---|
| 256 |
|
|---|
| 257 |
/* Calculate the size of a class entry */ |
|---|
| 258 |
void calc_class_entry(zend_class_entry * from TSRMLS_DC) |
|---|
| 259 |
{ |
|---|
| 260 |
if (from->type != ZEND_USER_CLASS) { |
|---|
| 261 |
ea_debug_error("[%d] EACCELERATOR can't cache internal class \"%s\"\n", getpid(), from->name); |
|---|
| 262 |
zend_bailout(); |
|---|
| 263 |
} |
|---|
| 264 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 265 |
EAG(mem) += sizeof(eaccelerator_class_entry); |
|---|
| 266 |
|
|---|
| 267 |
if (from->name != NULL) |
|---|
| 268 |
calc_string(from->name, from->name_length + 1 TSRMLS_CC); |
|---|
| 269 |
if (from->parent != NULL && from->parent->name) |
|---|
| 270 |
calc_string(from->parent->name, from->parent->name_length + 1 TSRMLS_CC); |
|---|
| 271 |
#ifdef ZEND_ENGINE_2 |
|---|
| 272 |
#if 0 |
|---|
| 273 |
// what's problem. why from->interfaces[i] == 0x5a5a5a5a ? |
|---|
| 274 |
for (i = 0; i < from->num_interfaces; i++) { |
|---|
| 275 |
if (from->interfaces[i]) { |
|---|
| 276 |
calc_string(from->interfaces[i]->name, |
|---|
| 277 |
from->interfaces[i]->name_length); |
|---|
| 278 |
} |
|---|
| 279 |
} |
|---|
| 280 |
#endif |
|---|
| 281 |
if (from->filename != NULL) |
|---|
| 282 |
calc_string(from->filename, strlen(from->filename) + 1 TSRMLS_CC); |
|---|
| 283 |
if (from->doc_comment != NULL) |
|---|
| 284 |
calc_string(from->doc_comment, from->doc_comment_len + 1 TSRMLS_CC); |
|---|
| 285 |
|
|---|
| 286 |
calc_zval_hash(&from->constants_table); |
|---|
| 287 |
calc_zval_hash(&from->default_properties); |
|---|
| 288 |
calc_hash(&from->properties_info, (calc_bucket_t) calc_property_info); |
|---|
| 289 |
if (from->static_members != NULL) { |
|---|
| 290 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 291 |
EAG(mem) += sizeof(HashTable); |
|---|
| 292 |
calc_zval_hash(from->static_members); |
|---|
| 293 |
} |
|---|
| 294 |
#else |
|---|
| 295 |
calc_zval_hash(&from->default_properties); |
|---|
| 296 |
#endif |
|---|
| 297 |
calc_hash(&from->function_table, (calc_bucket_t) calc_op_array); |
|---|
| 298 |
} |
|---|
| 299 |
|
|---|
| 300 |
/* Calculate the size of a cache entry with its given op_array and function and |
|---|
| 301 |
class bucket */ |
|---|
| 302 |
int calc_size(char *key, zend_op_array * op_array, |
|---|
| 303 |
Bucket * f, Bucket * c TSRMLS_DC) |
|---|
| 304 |
{ |
|---|
| 305 |
Bucket *b; |
|---|
| 306 |
char *x; |
|---|
| 307 |
int len = strlen(key); |
|---|
| 308 |
EAG(compress) = 1; |
|---|
| 309 |
EAG(mem) = NULL; |
|---|
| 310 |
|
|---|
| 311 |
zend_hash_init(&EAG(strings), 0, NULL, NULL, 0); |
|---|
| 312 |
EAG(mem) += offsetof(mm_cache_entry, realfilename) + len + 1; |
|---|
| 313 |
zend_hash_add(&EAG(strings), key, len + 1, &key, sizeof(char *), NULL); |
|---|
| 314 |
b = c; |
|---|
| 315 |
while (b != NULL) { |
|---|
| 316 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 317 |
EAG(mem) += offsetof(mm_fc_entry, htabkey) + b->nKeyLength; |
|---|
| 318 |
x = b->arKey; |
|---|
| 319 |
zend_hash_add(&EAG(strings), b->arKey, b->nKeyLength, &x, sizeof(char *), NULL); |
|---|
| 320 |
b = b->pListNext; |
|---|
| 321 |
} |
|---|
| 322 |
b = f; |
|---|
| 323 |
while (b != NULL) { |
|---|
| 324 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 325 |
EAG(mem) += offsetof(mm_fc_entry, htabkey) + b->nKeyLength; |
|---|
| 326 |
x = b->arKey; |
|---|
| 327 |
zend_hash_add(&EAG(strings), b->arKey, b->nKeyLength, &x, sizeof(char *), NULL); |
|---|
| 328 |
b = b->pListNext; |
|---|
| 329 |
} |
|---|
| 330 |
while (c != NULL) { |
|---|
| 331 |
#ifdef ZEND_ENGINE_2 |
|---|
| 332 |
calc_class_entry(*(zend_class_entry **) c->pData TSRMLS_CC); |
|---|
| 333 |
#else |
|---|
| 334 |
calc_class_entry((zend_class_entry *) c->pData TSRMLS_CC); |
|---|
| 335 |
#endif |
|---|
| 336 |
c = c->pListNext; |
|---|
| 337 |
} |
|---|
| 338 |
while (f != NULL) { |
|---|
| 339 |
calc_op_array((zend_op_array *) f->pData TSRMLS_CC); |
|---|
| 340 |
f = f->pListNext; |
|---|
| 341 |
} |
|---|
| 342 |
calc_op_array(op_array TSRMLS_CC); |
|---|
| 343 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 344 |
zend_hash_destroy(&EAG(strings)); |
|---|
| 345 |
return (size_t) EAG(mem); |
|---|
| 346 |
} |
|---|
| 347 |
|
|---|
| 348 |
/** Functions to store a script **/ |
|---|
| 349 |
static inline char *store_string(char *str, int len TSRMLS_DC) |
|---|
| 350 |
{ |
|---|
| 351 |
char *p; |
|---|
| 352 |
if (len > MAX_DUP_STR_LEN) { |
|---|
| 353 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 354 |
p = (char *) EAG(mem); |
|---|
| 355 |
EAG(mem) += len; |
|---|
| 356 |
memcpy(p, str, len); |
|---|
| 357 |
} else if (zend_hash_find(&EAG(strings), str, len, (void *) &p) == SUCCESS) { |
|---|
| 358 |
p = *(char **) p; |
|---|
| 359 |
} else { |
|---|
| 360 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 361 |
p = (char *) EAG(mem); |
|---|
| 362 |
EAG(mem) += len; |
|---|
| 363 |
memcpy(p, str, len); |
|---|
| 364 |
zend_hash_add(&EAG(strings), str, len, (void *) &p, sizeof(char *), NULL); |
|---|
| 365 |
} |
|---|
| 366 |
return p; |
|---|
| 367 |
} |
|---|
| 368 |
|
|---|
| 369 |
typedef void *(*store_bucket_t) (void *TSRMLS_DC); |
|---|
| 370 |
|
|---|
| 371 |
#define store_hash_ex(to, from, start, store_bucket) \ |
|---|
| 372 |
store_hash_int(to, from, start, store_bucket TSRMLS_CC) |
|---|
| 373 |
|
|---|
| 374 |
#define store_hash(to, from, store_bucket) \ |
|---|
| 375 |
store_hash_ex(to, from, (from)->pListHead, store_bucket) |
|---|
| 376 |
|
|---|
| 377 |
#define store_zval_hash(to, from) \ |
|---|
| 378 |
store_hash(to, from, (store_bucket_t)store_zval_ptr) |
|---|
| 379 |
|
|---|
| 380 |
#define store_zval_hash_ex(to, from, start) \ |
|---|
| 381 |
store_hash_ex(to, from, start, (store_bucket_t)store_zval_ptr) |
|---|
| 382 |
|
|---|
| 383 |
static zval *store_zval_ptr(zval * from TSRMLS_DC) |
|---|
| 384 |
{ |
|---|
| 385 |
zval *to; |
|---|
| 386 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 387 |
to = (zval *) EAG(mem); |
|---|
| 388 |
EAG(mem) += sizeof(zval); |
|---|
| 389 |
memcpy(to, from, sizeof(zval)); |
|---|
| 390 |
store_zval(to TSRMLS_CC); |
|---|
| 391 |
return to; |
|---|
| 392 |
} |
|---|
| 393 |
|
|---|
| 394 |
static void store_hash_int(HashTable * target, HashTable * source, |
|---|
| 395 |
Bucket * start, store_bucket_t copy_bucket TSRMLS_DC) |
|---|
| 396 |
{ |
|---|
| 397 |
Bucket *p, *np, *prev_p; |
|---|
| 398 |
|
|---|
| 399 |
memcpy(target, source, sizeof(HashTable)); |
|---|
| 400 |
|
|---|
| 401 |
if (source->nNumOfElements > 0) { |
|---|
| 402 |
if (!EAG(compress)) { |
|---|
| 403 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 404 |
target->arBuckets = (Bucket **) EAG(mem); |
|---|
| 405 |
EAG(mem) += target->nTableSize * sizeof(Bucket *); |
|---|
| 406 |
memset(target->arBuckets, 0, target->nTableSize * sizeof(Bucket *)); |
|---|
| 407 |
} |
|---|
| 408 |
|
|---|
| 409 |
target->pDestructor = NULL; |
|---|
| 410 |
target->persistent = 1; |
|---|
| 411 |
target->pListHead = NULL; |
|---|
| 412 |
target->pListTail = NULL; |
|---|
| 413 |
|
|---|
| 414 |
p = start; |
|---|
| 415 |
prev_p = NULL; |
|---|
| 416 |
np = NULL; |
|---|
| 417 |
while (p) { |
|---|
| 418 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 419 |
np = (Bucket *) EAG(mem); |
|---|
| 420 |
EAG(mem) += offsetof(Bucket, arKey) + p->nKeyLength; |
|---|
| 421 |
|
|---|
| 422 |
if (!EAG(compress)) { |
|---|
| 423 |
int nIndex = p->h % source->nTableSize; |
|---|
| 424 |
if (target->arBuckets[nIndex]) { |
|---|
| 425 |
np->pNext = target->arBuckets[nIndex]; |
|---|
| 426 |
np->pLast = NULL; |
|---|
| 427 |
np->pNext->pLast = np; |
|---|
| 428 |
} else { |
|---|
| 429 |
np->pNext = NULL; |
|---|
| 430 |
np->pLast = NULL; |
|---|
| 431 |
} |
|---|
| 432 |
target->arBuckets[nIndex] = np; |
|---|
| 433 |
} |
|---|
| 434 |
np->h = p->h; |
|---|
| 435 |
np->nKeyLength = p->nKeyLength; |
|---|
| 436 |
|
|---|
| 437 |
if (p->pDataPtr == NULL) { |
|---|
| 438 |
np->pData = copy_bucket(p->pData TSRMLS_CC); |
|---|
| 439 |
np->pDataPtr = NULL; |
|---|
| 440 |
} else { |
|---|
| 441 |
np->pDataPtr = copy_bucket(p->pDataPtr TSRMLS_CC); |
|---|
| 442 |
np->pData = &np->pDataPtr; |
|---|
| 443 |
} |
|---|
| 444 |
|
|---|
| 445 |
np->pListLast = prev_p; |
|---|
| 446 |
np->pListNext = NULL; |
|---|
| 447 |
|
|---|
| 448 |
memcpy(np->arKey, p->arKey, p->nKeyLength); |
|---|
| 449 |
|
|---|
| 450 |
if (prev_p) { |
|---|
| 451 |
prev_p->pListNext = np; |
|---|
| 452 |
} else { |
|---|
| 453 |
target->pListHead = np; |
|---|
| 454 |
} |
|---|
| 455 |
prev_p = np; |
|---|
| 456 |
p = p->pListNext; |
|---|
| 457 |
} |
|---|
| 458 |
target->pListTail = np; |
|---|
| 459 |
target->pInternalPointer = target->pListHead; |
|---|
| 460 |
} |
|---|
| 461 |
} |
|---|
| 462 |
|
|---|
| 463 |
void store_zval(zval * zv TSRMLS_DC) |
|---|
| 464 |
{ |
|---|
| 465 |
switch (zv->type & ~IS_CONSTANT_INDEX) { |
|---|
| 466 |
case IS_CONSTANT: |
|---|
| 467 |
case IS_STRING: |
|---|
| 468 |
if (zv->value.str.val == NULL || |
|---|
| 469 |
zv->value.str.val == empty_string || zv->value.str.len == 0) { |
|---|
| 470 |
zv->value.str.val = empty_string; |
|---|
| 471 |
zv->value.str.len = 0; |
|---|
| 472 |
} else { |
|---|
| 473 |
zv->value.str.val = store_string(zv->value.str.val, zv->value.str.len + 1 TSRMLS_CC); |
|---|
| 474 |
} |
|---|
| 475 |
break; |
|---|
| 476 |
case IS_ARRAY: |
|---|
| 477 |
case IS_CONSTANT_ARRAY: |
|---|
| 478 |
if (zv->value.ht != NULL && zv->value.ht != &EG(symbol_table)) { |
|---|
| 479 |
HashTable *p; |
|---|
| 480 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 481 |
p = (HashTable *) EAG(mem); |
|---|
| 482 |
EAG(mem) += sizeof(HashTable); |
|---|
| 483 |
store_zval_hash(p, zv->value.ht); |
|---|
| 484 |
zv->value.ht = p; |
|---|
| 485 |
} |
|---|
| 486 |
break; |
|---|
| 487 |
case IS_OBJECT: |
|---|
| 488 |
if (!EAG(compress)) { |
|---|
| 489 |
return; |
|---|
| 490 |
} |
|---|
| 491 |
#ifndef ZEND_ENGINE_2 |
|---|
| 492 |
if (zv->value.obj.ce != NULL) { |
|---|
| 493 |
char *s = store_string(zv->value.obj.ce->name, zv->value.obj.ce->name_length + 1 TSRMLS_CC); |
|---|
| 494 |
zend_str_tolower(s, zv->value.obj.ce->name_length); |
|---|
| 495 |
zv->value.obj.ce = (zend_class_entry *) s; |
|---|
| 496 |
} |
|---|
| 497 |
if (zv->value.obj.properties != NULL) { |
|---|
| 498 |
HashTable *p; |
|---|
| 499 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 500 |
p = (HashTable *) EAG(mem); |
|---|
| 501 |
EAG(mem) += sizeof(HashTable); |
|---|
| 502 |
store_zval_hash(p, zv->value.obj.properties); |
|---|
| 503 |
zv->value.obj.properties = p; |
|---|
| 504 |
} |
|---|
| 505 |
#endif |
|---|
| 506 |
default: |
|---|
| 507 |
break; |
|---|
| 508 |
} |
|---|
| 509 |
} |
|---|
| 510 |
|
|---|
| 511 |
eaccelerator_op_array *store_op_array(zend_op_array * from TSRMLS_DC) |
|---|
| 512 |
{ |
|---|
| 513 |
eaccelerator_op_array *to; |
|---|
| 514 |
zend_op *opline; |
|---|
| 515 |
zend_op *end; |
|---|
| 516 |
|
|---|
| 517 |
ea_debug_pad(EA_DEBUG TSRMLS_CC); |
|---|
| 518 |
ea_debug_printf(EA_DEBUG, "[%d] store_op_array: %s [scope=%s]\n", |
|---|
| 519 |
getpid(), from->function_name ? from->function_name : "(top)", |
|---|
| 520 |
#ifdef ZEND_ENGINE_2 |
|---|
| 521 |
from->scope ? from->scope->name : "NULL" |
|---|
| 522 |
#else |
|---|
| 523 |
"NULL" |
|---|
| 524 |
#endif |
|---|
| 525 |
); |
|---|
| 526 |
|
|---|
| 527 |
if (from->type == ZEND_INTERNAL_FUNCTION) { |
|---|
| 528 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 529 |
to = (eaccelerator_op_array *) EAG(mem); |
|---|
| 530 |
EAG(mem) += offsetof(eaccelerator_op_array, opcodes); |
|---|
| 531 |
} else if (from->type == ZEND_USER_FUNCTION) { |
|---|
| 532 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 533 |
to = (eaccelerator_op_array *) EAG(mem); |
|---|
| 534 |
EAG(mem) += sizeof(eaccelerator_op_array); |
|---|
| 535 |
} else { |
|---|
| 536 |
return NULL; |
|---|
| 537 |
} |
|---|
| 538 |
|
|---|
| 539 |
to->type = from->type; |
|---|
| 540 |
#ifdef ZEND_ENGINE_2 |
|---|
| 541 |
to->num_args = from->num_args; |
|---|
| 542 |
to->required_num_args = from->required_num_args; |
|---|
| 543 |
if (from->num_args > 0) { |
|---|
| 544 |
zend_uint i; |
|---|
| 545 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 546 |
to->arg_info = (zend_arg_info *) EAG(mem); |
|---|
| 547 |
EAG(mem) += from->num_args * sizeof(zend_arg_info); |
|---|
| 548 |
for (i = 0; i < from->num_args; i++) { |
|---|
| 549 |
if (from->arg_info[i].name) { |
|---|
| 550 |
to->arg_info[i].name = store_string(from->arg_info[i].name, from->arg_info[i].name_len + 1 TSRMLS_CC); |
|---|
| 551 |
to->arg_info[i].name_len = from->arg_info[i].name_len; |
|---|
| 552 |
} |
|---|
| 553 |
if (from->arg_info[i].class_name) { |
|---|
| 554 |
to->arg_info[i].class_name = store_string(from->arg_info[i].class_name, from->arg_info[i].class_name_len + 1 TSRMLS_CC); |
|---|
| 555 |
to->arg_info[i].class_name_len = from->arg_info[i].class_name_len; |
|---|
| 556 |
} |
|---|
| 557 |
to->arg_info[i].allow_null = from->arg_info[i].allow_null; |
|---|
| 558 |
to->arg_info[i].pass_by_reference = from->arg_info[i].pass_by_reference; |
|---|
| 559 |
to->arg_info[i].return_reference = from->arg_info[i].return_reference; |
|---|
| 560 |
} |
|---|
| 561 |
} |
|---|
| 562 |
to->pass_rest_by_reference = from->pass_rest_by_reference; |
|---|
| 563 |
#else |
|---|
| 564 |
if (from->arg_types != NULL) |
|---|
| 565 |
to->arg_types = (unsigned char *) store_string((char *) from->arg_types, (from->arg_types[0] + 1) * sizeof(zend_uchar) TSRMLS_CC); |
|---|
| 566 |
#endif |
|---|
| 567 |
if (from->function_name != NULL) |
|---|
| 568 |
to->function_name = store_string(from->function_name, strlen(from->function_name) + 1 TSRMLS_CC); |
|---|
| 569 |
#ifdef ZEND_ENGINE_2 |
|---|
| 570 |
to->fn_flags = from->fn_flags; |
|---|
| 571 |
to->scope_name = NULL; |
|---|
| 572 |
to->scope_name_len = 0; |
|---|
| 573 |
if (from->scope != NULL) { |
|---|
| 574 |
Bucket *q = CG(class_table)->pListHead; |
|---|
| 575 |
while (q != NULL) { |
|---|
| 576 |
if (*(zend_class_entry **) q->pData == from->scope) { |
|---|
| 577 |
to->scope_name = store_string(q->arKey, q->nKeyLength TSRMLS_CC); |
|---|
| 578 |
to->scope_name_len = q->nKeyLength - 1; |
|---|
| 579 |
|
|---|
| 580 |
ea_debug_pad(EA_DEBUG TSRMLS_CC); |
|---|
| 581 |
ea_debug_printf(EA_DEBUG, |
|---|
| 582 |
"[%d] find scope '%s' in CG(class_table) save hashkey '%s' [%08x] as to->scope_name\n", |
|---|
| 583 |
getpid(), from->scope->name ? from->scope->name : "NULL", q->arKey, to->scope_name); |
|---|
| 584 |
break; |
|---|
| 585 |
} |
|---|
| 586 |
q = q->pListNext; |
|---|
| 587 |
} |
|---|
| 588 |
if (to->scope_name == NULL) { |
|---|
| 589 |
ea_debug_pad(EA_DEBUG TSRMLS_CC); |
|---|
| 590 |
ea_debug_printf(EA_DEBUG, |
|---|
| 591 |
"[%d] could not find scope '%s' in CG(class_table), saving it to NULL\n", |
|---|
| 592 |
getpid(), from->scope->name ? from->scope->name : "NULL"); |
|---|
| 593 |
} |
|---|
| 594 |
} |
|---|
| 595 |
#endif |
|---|
| 596 |
|
|---|
| 597 |
if (from->type == ZEND_INTERNAL_FUNCTION) |
|---|
| 598 |
return to; |
|---|
| 599 |
|
|---|
| 600 |
to->opcodes = from->opcodes; |
|---|
| 601 |
to->last = from->last; |
|---|
| 602 |
to->T = from->T; |
|---|
| 603 |
to->brk_cont_array = from->brk_cont_array; |
|---|
| 604 |
to->last_brk_cont = from->last_brk_cont; |
|---|
| 605 |
#ifdef ZEND_ENGINE_2 |
|---|
| 606 |
to->try_catch_array = from->try_catch_array; |
|---|
| 607 |
to->last_try_catch = from->last_try_catch; |
|---|
| 608 |
to->uses_this = from->uses_this; |
|---|
| 609 |
#else |
|---|
| 610 |
to->uses_globals = from->uses_globals; |
|---|
| 611 |
#endif |
|---|
| 612 |
to->static_variables = from->static_variables; |
|---|
| 613 |
to->return_reference = from->return_reference; |
|---|
| 614 |
to->filename = from->filename; |
|---|
| 615 |
|
|---|
| 616 |
if (from->opcodes != NULL) { |
|---|
| 617 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 618 |
to->opcodes = (zend_op *) EAG(mem); |
|---|
| 619 |
EAG(mem) += from->last * sizeof(zend_op); |
|---|
| 620 |
memcpy(to->opcodes, from->opcodes, from->last * sizeof(zend_op)); |
|---|
| 621 |
|
|---|
| 622 |
opline = to->opcodes; |
|---|
| 623 |
end = opline + to->last; |
|---|
| 624 |
EAG(compress) = 0; |
|---|
| 625 |
for (; opline < end; opline++) { |
|---|
| 626 |
/* |
|---|
| 627 |
if (opline->result.op_type == IS_CONST) |
|---|
| 628 |
store_zval(&opline->result.u.constant TSRMLS_CC); |
|---|
| 629 |
*/ |
|---|
| 630 |
if (opline->op1.op_type == IS_CONST) |
|---|
| 631 |
store_zval(&opline->op1.u.constant TSRMLS_CC); |
|---|
| 632 |
if (opline->op2.op_type == IS_CONST) |
|---|
| 633 |
store_zval(&opline->op2.u.constant TSRMLS_CC); |
|---|
| 634 |
#ifdef ZEND_ENGINE_2 |
|---|
| 635 |
switch (opline->opcode) { |
|---|
| 636 |
case ZEND_JMP: |
|---|
| 637 |
opline->op1.u.jmp_addr = to->opcodes + (opline->op1.u.jmp_addr - from->opcodes); |
|---|
| 638 |
break; |
|---|
| 639 |
case ZEND_JMPZ: |
|---|
| 640 |
case ZEND_JMPNZ: |
|---|
| 641 |
case ZEND_JMPZ_EX: |
|---|
| 642 |
case ZEND_JMPNZ_EX: |
|---|
| 643 |
opline->op2.u.jmp_addr = to->opcodes + (opline->op2.u.jmp_addr - from->opcodes); |
|---|
| 644 |
break; |
|---|
| 645 |
} |
|---|
| 646 |
#endif |
|---|
| 647 |
} |
|---|
| 648 |
EAG(compress) = 1; |
|---|
| 649 |
} |
|---|
| 650 |
if (from->brk_cont_array != NULL) { |
|---|
| 651 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 652 |
to->brk_cont_array = (zend_brk_cont_element *) EAG(mem); |
|---|
| 653 |
EAG(mem) += sizeof(zend_brk_cont_element) * from->last_brk_cont; |
|---|
| 654 |
memcpy(to->brk_cont_array, from->brk_cont_array, sizeof(zend_brk_cont_element) * from->last_brk_cont); |
|---|
| 655 |
} else { |
|---|
| 656 |
to->last_brk_cont = 0; |
|---|
| 657 |
} |
|---|
| 658 |
#ifdef ZEND_ENGINE_2 |
|---|
| 659 |
if (from->try_catch_array != NULL) { |
|---|
| 660 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 661 |
to->try_catch_array = (zend_try_catch_element *) EAG(mem); |
|---|
| 662 |
EAG(mem) += sizeof(zend_try_catch_element) * from->last_try_catch; |
|---|
| 663 |
memcpy(to->try_catch_array, from->try_catch_array, sizeof(zend_try_catch_element) * from->last_try_catch); |
|---|
| 664 |
} else { |
|---|
| 665 |
to->last_try_catch = 0; |
|---|
| 666 |
} |
|---|
| 667 |
#endif |
|---|
| 668 |
if (from->static_variables != NULL) { |
|---|
| 669 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 670 |
to->static_variables = (HashTable *) EAG(mem); |
|---|
| 671 |
EAG(mem) += sizeof(HashTable); |
|---|
| 672 |
store_zval_hash(to->static_variables, from->static_variables); |
|---|
| 673 |
} |
|---|
| 674 |
if (from->filename != NULL) { |
|---|
| 675 |
to->filename = store_string(to->filename, strlen(from->filename) + 1 TSRMLS_CC); |
|---|
| 676 |
} |
|---|
| 677 |
#ifdef ZEND_ENGINE_2 |
|---|
| 678 |
to->line_start = from->line_start; |
|---|
| 679 |
to->line_end = from->line_end; |
|---|
| 680 |
to->doc_comment_len = from->doc_comment_len; |
|---|
| 681 |
if (from->doc_comment != NULL) |
|---|
| 682 |
to->doc_comment = store_string(from->doc_comment, from->doc_comment_len + 1 TSRMLS_CC); |
|---|
| 683 |
#endif |
|---|
| 684 |
return to; |
|---|
| 685 |
} |
|---|
| 686 |
|
|---|
| 687 |
#ifdef ZEND_ENGINE_2 |
|---|
| 688 |
static zend_property_info *store_property_info(zend_property_info * from TSRMLS_DC) |
|---|
| 689 |
{ |
|---|
| 690 |
zend_property_info *to; |
|---|
| 691 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 692 |
to = (zend_property_info *) EAG(mem); |
|---|
| 693 |
EAG(mem) += sizeof(zend_property_info); |
|---|
| 694 |
memcpy(to, from, sizeof(zend_property_info)); |
|---|
| 695 |
to->name = store_string(from->name, from->name_length + 1 TSRMLS_CC); |
|---|
| 696 |
return to; |
|---|
| 697 |
} |
|---|
| 698 |
#endif |
|---|
| 699 |
|
|---|
| 700 |
eaccelerator_class_entry *store_class_entry(zend_class_entry * from TSRMLS_DC) |
|---|
| 701 |
{ |
|---|
| 702 |
eaccelerator_class_entry *to; |
|---|
| 703 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 704 |
to = (eaccelerator_class_entry *) EAG(mem); |
|---|
| 705 |
EAG(mem) += sizeof(eaccelerator_class_entry); |
|---|
| 706 |
to->type = from->type; |
|---|
| 707 |
to->name = NULL; |
|---|
| 708 |
to->name_length = from->name_length; |
|---|
| 709 |
to->parent = NULL; |
|---|
| 710 |
#ifdef ZEND_ENGINE_2 |
|---|
| 711 |
to->ce_flags = from->ce_flags; |
|---|
| 712 |
to->static_members = NULL; |
|---|
| 713 |
to->num_interfaces = from->num_interfaces; |
|---|
| 714 |
|
|---|
| 715 |
#if 0 |
|---|
| 716 |
// i need to check more. why this field is null. |
|---|
| 717 |
// |
|---|
| 718 |
for (i = 0; i < from->num_interfaces; i++) { |
|---|
| 719 |
if (from->interfaces[i]) { |
|---|
| 720 |
to->interfaces[i] = |
|---|
| 721 |
store_string(from->interfaces[i]->name, |
|---|
| 722 |
from->interfaces[i]->name_length); |
|---|
| 723 |
} |
|---|
| 724 |
} |
|---|
| 725 |
#endif |
|---|
| 726 |
|
|---|
| 727 |
#endif |
|---|
| 728 |
|
|---|
| 729 |
ea_debug_pad(EA_DEBUG TSRMLS_CC); |
|---|
| 730 |
ea_debug_printf(EA_DEBUG, "[%d] store_class_entry: %s parent was '%s'\n", |
|---|
| 731 |
getpid(), from->name ? from->name : "(top)", |
|---|
| 732 |
from->parent ? from->parent->name : "NULL"); |
|---|
| 733 |
#ifdef DEBUG |
|---|
| 734 |
EAG(xpad)++; |
|---|
| 735 |
#endif |
|---|
| 736 |
|
|---|
| 737 |
if (from->name != NULL) |
|---|
| 738 |
to->name = store_string(from->name, from->name_length + 1 TSRMLS_CC); |
|---|
| 739 |
if (from->parent != NULL && from->parent->name) |
|---|
| 740 |
to->parent = store_string(from->parent->name, from->parent->name_length + 1 TSRMLS_CC); |
|---|
| 741 |
|
|---|
| 742 |
/* |
|---|
| 743 |
if (!from->constants_updated) { |
|---|
| 744 |
zend_hash_apply_with_argument(&from->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC); |
|---|
| 745 |
to->constants_updated = 1; |
|---|
| 746 |
} |
|---|
| 747 |
*/ |
|---|
| 748 |
#ifdef ZEND_ENGINE_2 |
|---|
| 749 |
to->line_start = from->line_start; |
|---|
| 750 |
to->line_end = from->line_end; |
|---|
| 751 |
to->doc_comment_len = from->doc_comment_len; |
|---|
| 752 |
to->iterator_funcs = from->iterator_funcs; |
|---|
| 753 |
to->create_object = from->create_object; |
|---|
| 754 |
to->get_iterator = from->get_iterator; |
|---|
| 755 |
to->interface_gets_implemented = from->interface_gets_implemented; |
|---|
| 756 |
|
|---|
| 757 |
if (from->filename != NULL) |
|---|
| 758 |
to->filename = store_string(from->filename, strlen(from->filename) + 1 TSRMLS_CC); |
|---|
| 759 |
if (from->doc_comment != NULL) |
|---|
| 760 |
to->doc_comment = store_string(from->doc_comment, from->doc_comment_len + 1 TSRMLS_CC); |
|---|
| 761 |
|
|---|
| 762 |
store_zval_hash(&to->constants_table, &from->constants_table); |
|---|
| 763 |
store_zval_hash(&to->default_properties, &from->default_properties); |
|---|
| 764 |
store_hash(&to->properties_info, &from->properties_info, (store_bucket_t) store_property_info); |
|---|
| 765 |
if (from->static_members != NULL) { |
|---|
| 766 |
EACCELERATOR_ALIGN(EAG(mem)); |
|---|
| 767 |
to->static_members = (HashTable *) EAG(mem); |
|---|
| 768 |
EAG(mem) += sizeof(HashTable); |
|---|
| 769 |
store_zval_hash(to->static_members, from->static_members); |
|---|
| 770 |
} |
|---|
| 771 |
#else |
|---|
| 772 |
store_zval_hash(&to->default_properties, &from->default_properties); |
|---|
| 773 |
#endif |
|---|
| 774 |
store_hash(&to->function_table, &from->function_table, (store_bucket_t) store_op_array); |
|---|
| 775 |
|
|---|
| 776 |
#ifdef DEBUG |
|---|
| 777 |
EAG(xpad)--; |
|---|
| 778 |
#endif |
|---|
| 779 |
|
|---|
| 780 |
return to; |
|---|
| 781 |
} |
|---|
| 782 |
|
|---|
| 783 |
#endif /* HAVE_EACCELERATOR */ |
|---|