felipe Tue, 20 Jul 2010 17:22:51 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=301423
Log: - Reverted mem alloc function change - Fixed lineno on method declarations Changed paths: U php/php-src/branches/LEMON/Zend/zend_compile.c U php/php-src/branches/LEMON/Zend/zend_ini_parser.y U php/php-src/branches/LEMON/Zend/zend_language_parser.y Modified: php/php-src/branches/LEMON/Zend/zend_compile.c =================================================================== --- php/php-src/branches/LEMON/Zend/zend_compile.c 2010-07-20 15:38:17 UTC (rev 301422) +++ php/php-src/branches/LEMON/Zend/zend_compile.c 2010-07-20 17:22:51 UTC (rev 301423) @@ -6114,8 +6114,8 @@ int token, halting = 0, old_exit_status; void *pParser; - if ((pParser = zend_lang_parseAlloc(_emalloc)) == NULL) { - zend_lang_parseFree(pParser, _efree); + if ((pParser = zend_lang_parseAlloc(malloc)) == NULL) { + zend_lang_parseFree(pParser, free); return 1; } @@ -6174,7 +6174,7 @@ break; } } - zend_lang_parseFree(pParser, _efree); + zend_lang_parseFree(pParser, free); if (EG(exit_status) == 255) { /* We got an E_PARSE */ Modified: php/php-src/branches/LEMON/Zend/zend_ini_parser.y =================================================================== --- php/php-src/branches/LEMON/Zend/zend_ini_parser.y 2010-07-20 15:38:17 UTC (rev 301422) +++ php/php-src/branches/LEMON/Zend/zend_ini_parser.y 2010-07-20 17:22:51 UTC (rev 301423) @@ -219,10 +219,10 @@ int ini_parse(TSRMLS_D) /* {{{ */ { int token; - void *pParser = zend_ini_parseAlloc(_emalloc); + void *pParser = zend_ini_parseAlloc(malloc); if (pParser == NULL) { - zend_ini_parseFree(pParser, _efree); + zend_ini_parseFree(pParser, free); return 1; } @@ -236,7 +236,7 @@ } } - zend_ini_parseFree(pParser, _efree); + zend_ini_parseFree(pParser, free); if (ZEND_INI_PARSER_SE) { return 1; } else { Modified: php/php-src/branches/LEMON/Zend/zend_language_parser.y =================================================================== --- php/php-src/branches/LEMON/Zend/zend_language_parser.y 2010-07-20 15:38:17 UTC (rev 301422) +++ php/php-src/branches/LEMON/Zend/zend_language_parser.y 2010-07-20 17:22:51 UTC (rev 301423) @@ -136,7 +136,6 @@ %left ELSEIF. %left ELSE. %left ENDIF. - %right STATIC ABSTRACT FINAL PRIVATE PROTECTED PUBLIC. // dummy tokens @@ -575,9 +574,16 @@ class_statement ::= class_statement_i class_variables SEMICOLON. class_statement ::= class_constants SEMICOLON. class_statement ::= trait_use_statement. -class_statement ::= class_statement_ii(B) LPAREN parameters RPAREN method_body(C). { zend_do_abstract_method(&B[2], &B[0], &C TSRMLS_CC); zend_do_end_function_declaration(&B[1] TSRMLS_CC); } +method_body_i(A) ::= LPAREN parameters RPAREN(C) LBRACE inner_statement_list. { A = C; } +method_body ::= class_statement_ii(B) method_body_i(C). { Z_LVAL(C.u.constant) = 0; zend_do_abstract_method(&B[2], &B[0], &C TSRMLS_CC); zend_do_end_function_declaration(&B[1] TSRMLS_CC); } + +method_body_abstract ::= class_statement_ii(B) LPAREN parameters RPAREN(C). { Z_LVAL(C.u.constant) = ZEND_ACC_ABSTRACT; zend_do_abstract_method(&B[2], &B[0], &C TSRMLS_CC); zend_do_end_function_declaration(&B[1] TSRMLS_CC); } + +class_statement ::= method_body_abstract SEMICOLON. +class_statement ::= method_body RBRACE. + trait_use_statement ::= USE trait_list trait_adaptations. trait_list ::= fully_qualified_class_name(B). { zend_do_implements_trait(&B TSRMLS_CC); } @@ -609,9 +615,6 @@ trait_modifiers(A) ::= . { Z_LVAL(A.u.constant) = 0x0; } /* No change of methods visibility */ trait_modifiers(A) ::= member_modifier(B). { A = B; } /* REM: Keep in mind, there are not only visibility modifiers */ -method_body(A) ::= SEMICOLON. { Z_LVAL(A.u.constant) = ZEND_ACC_ABSTRACT; } -method_body(A) ::= LBRACE inner_statement_list RBRACE. { Z_LVAL(A.u.constant) = 0; } - variable_modifiers(A) ::= member_modifiers_list(B). { A = B; } variable_modifiers(A) ::= VAR. { Z_LVAL(A.u.constant) = ZEND_ACC_PUBLIC; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php