rfc:error-optimizations

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:error-optimizations [2010/08/22 15:20] kallerfc:error-optimizations [2010/08/23 22:15] kalle
Line 15: Line 15:
 ===== Implementation ===== ===== Implementation =====
  
-This RFC's implementation, proposes that we extends the EG() globals (executor) inside the Engine, to contain two new fields:+This RFC's implementation, proposes that we extends the EG() globals (executor) inside the Engine, to contain four new fields:
 <code c> <code c>
         ...         ...
Line 22: Line 22:
         zend_error_arguments error_stack[];         zend_error_arguments error_stack[];
         int error_stack_size: 0;         int error_stack_size: 0;
 +        ...
 </code> </code>
  
-The new structure, "zend_error_arguments", it looks like the following:+The new structure, "zend_error_arguments" looks like the following:
  
 <code c> <code c>
Line 30: Line 31:
  /* Message format */  /* Message format */
  const char *format;  const char *format;
 +
 +        /* Error type */
 +        const short type;
  
  /* File, and line number, if any */  /* File, and line number, if any */
Line 47: Line 51:
 zend_error_arguments arguments; zend_error_arguments arguments;
  
-... +/* put the data into the arguments structure */
  
 if (EG(error_stack_enabled) && EG(error_stack_logging)) { if (EG(error_stack_enabled) && EG(error_stack_logging)) {
Line 54: Line 58:
         if (EG(error_stack_logging)) {         if (EG(error_stack_logging)) {
                   /* dispatch to error logging hook */                   /* dispatch to error logging hook */
 +        } else {
 +                  /* no logging, increase the stack size */
 +
 +                  ++EG(error_stack_size);
         }         }
 } else { } else {
-        ...+        /* BC code */
 } }
 </code> </code>
Line 68: Line 76:
         char *error;         char *error;
  
-        /* Dispatch to formatting function, and copy it into, the "error" variable */+        /* dispatch to formatting function, and copy it into, the "error" variable */
  
         RETURN_STRING(error, 0, 1);         RETURN_STRING(error, 0, 1);
 } else { } else {
-        ...+        /* BC code */
 } }
 </code> </code>
rfc/error-optimizations.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1