[PHP-CVS] com php-src: Merge branch 'PHP-5.4': Zend/zend_vm_def.h Zend/zend_vm_execute.h

2012-09-27 Thread Nikita Popov
Commit:aaabac2473e53327bf0587876799ca4aed6c9c19
Author:Nikita Popov ni...@php.net Thu, 27 Sep 2012 18:46:27 +0200
Parents:   da96aa848fc4845399d4d7a7c396fa31ffb9ffba 
592b232e834ed2698fa97ad4dd58e5ab21f257be
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=aaabac2473e53327bf0587876799ca4aed6c9c19

Log:
Merge branch 'PHP-5.4'

Conflicts:
Zend/zend_vm_def.h

Changed paths:
  MM  Zend/zend_vm_def.h
  MM  Zend/zend_vm_execute.h

diff --cc Zend/zend_vm_def.h
index e0fc1bf,9d475a6..ab5102f
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@@ -2467,428 -2501,296 +2467,432 @@@ ZEND_VM_HANDLER(55, ZEND_ADD_STRING, TM
ZEND_VM_NEXT_OPCODE();
  }
  
 -ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
 +ZEND_VM_HANDLER(56, ZEND_ADD_VAR, TMP|UNUSED, TMP|VAR|CV)
  {
 -  zend_bool nested;
 -  zend_op_array *op_array = EX(op_array);
 +  USE_OPLINE
 +  zend_free_op free_op2;
 +  zval *str = EX_T(opline-result.var).tmp_var;
 +  zval *var;
 +  zval var_copy;
 +  int use_copy = 0;
  
 -  EG(current_execute_data) = EX(prev_execute_data);
 -  EG(opline_ptr) = NULL;
 -  if (!EG(active_symbol_table)) {
 -  zval ***cv = EX_CVs();
 -  zval ***end = cv + op_array-last_var;
 -  while (cv != end) {
 -  if (*cv) {
 -  zval_ptr_dtor(*cv);
 -  }
 -  cv++;
 -  }
 -  }
 +  SAVE_OPLINE();
 +  var = GET_OP2_ZVAL_PTR(BP_VAR_R);
  
 -  if ((op_array-fn_flags  ZEND_ACC_CLOSURE)  op_array-prototype) {
 -  zval_ptr_dtor((zval**)op_array-prototype);
 +  if (OP1_TYPE == IS_UNUSED) {
 +  /* Initialize for erealloc in add_string_to_string */
 +  Z_STRVAL_P(str) = NULL;
 +  Z_STRLEN_P(str) = 0;
 +  Z_TYPE_P(str) = IS_STRING;
 +
 +  INIT_PZVAL(str);
}
  
 -  nested = EX(nested);
 +  if (Z_TYPE_P(var) != IS_STRING) {
 +  zend_make_printable_zval(var, var_copy, use_copy);
  
 -  zend_vm_stack_free(execute_data TSRMLS_CC);
 +  if (use_copy) {
 +  var = var_copy;
 +  }
 +  }
 +  add_string_to_string(str, str, var);
  
 -  if (nested) {
 -  execute_data = EG(current_execute_data);
 +  if (use_copy) {
 +  zval_dtor(var);
}
 -  if (nested) {
 -  USE_OPLINE
 +  /* original comment, possibly problematic:
 +   * FREE_OP is missing intentionally here - we're always working on the 
same temporary variable
 +   * (Zeev):  I don't think it's problematic, we only use variables
 +   * which aren't affected by FREE_OP(Ts, )'s anyway, unless they're
 +   * string offsets or overloaded objects
 +   */
 +  FREE_OP2();
  
 -  LOAD_REGS();
 -  LOAD_OPLINE();
 -  if (UNEXPECTED(opline-opcode == ZEND_INCLUDE_OR_EVAL)) {
 +  CHECK_EXCEPTION();
 +  ZEND_VM_NEXT_OPCODE();
 +}
  
 -  EX(function_state).function = (zend_function *) 
EX(op_array);
 -  EX(function_state).arguments = NULL;
 -  EX(object) = EX(current_object);
 +ZEND_VM_HANDLER(109, ZEND_FETCH_CLASS, ANY, CONST|TMP|VAR|UNUSED|CV)
 +{
 +  USE_OPLINE
  
 -  EG(opline_ptr) = EX(opline);
 -  EG(active_op_array) = EX(op_array);
 -  EG(return_value_ptr_ptr) = EX(original_return_value);
 -  destroy_op_array(op_array TSRMLS_CC);
 -  efree(op_array);
 -  if (UNEXPECTED(EG(exception) != NULL)) {
 -  zend_throw_exception_internal(NULL TSRMLS_CC);
 -  HANDLE_EXCEPTION_LEAVE();
 -  } else if (RETURN_VALUE_USED(opline)) {
 -  if (!EX_T(opline-result.var).var.ptr) { /* 
there was no return statement */
 -  zval *retval;
 +  SAVE_OPLINE();
 +  if (EG(exception)) {
 +  zend_exception_save(TSRMLS_C);
 +  }
 +  if (OP2_TYPE == IS_UNUSED) {
 +  EX_T(opline-result.var).class_entry = zend_fetch_class(NULL, 
0, opline-extended_value TSRMLS_CC);
 +  CHECK_EXCEPTION();
 +  ZEND_VM_NEXT_OPCODE();
 +  } else {
 +  zend_free_op free_op2;
 +  zval *class_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
  
 -  ALLOC_ZVAL(retval);
 -  ZVAL_BOOL(retval, 1);
 -  INIT_PZVAL(retval);
 -  EX_T(opline-result.var).var.ptr = 
retval;
 -  }
 +  if (OP2_TYPE == IS_CONST) {
 +  if (CACHED_PTR(opline-op2.literal-cache_slot)) {
 + 

[PHP-CVS] com php-src: Merge branch 'PHP-5.4': Zend/zend_vm_def.h Zend/zend_vm_execute.h

2012-07-25 Thread Xinchen Hui
Commit:80497ea7dfade2ccd032ef65103c0a113338653a
Author:Xinchen Hui larue...@php.net Thu, 26 Jul 2012 13:58:01 
+0800
Parents:   07c61c2fdb5c6016508cfac7deb783b9dbef2ad5 
302ad0d648376e072358a269432d3598302b62c0
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=80497ea7dfade2ccd032ef65103c0a113338653a

Log:
Merge branch 'PHP-5.4'

Changed paths:
  MM  Zend/zend_vm_def.h
  MM  Zend/zend_vm_execute.h


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php