--- parser3/src/main/compile.tab.C 2010/07/25 06:55:45 1.150 +++ parser3/src/main/compile.tab.C 2012/05/30 03:09:07 1.155 @@ -129,12 +129,14 @@ /** @file Parser: compiler(lexical parser and grammar). - Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: compile.tab.C,v 1.150 2010/07/25 06:55:45 misha Exp $ + */ +volatile const char * IDENT_COMPILE_Y = "$Id: compile.tab.C,v 1.155 2012/05/30 03:09:07 misha Exp $"; + /** @todo parser4: - cache compiled code from request to request. to do that... @@ -162,7 +164,6 @@ #include "pa_vobject.h" #include "pa_vdouble.h" #include "pa_globals.h" -#include "pa_vvoid.h" #include "pa_vmethod_frame.h" // defines @@ -181,7 +182,7 @@ static int yylex(YYSTYPE* lvalp, void* p static const VBool vfalse(false); static const VBool vtrue(true); -static const VVoid vvoid; +static const VString vempty; // local convinient inplace typecast & var #undef PC @@ -217,7 +218,7 @@ typedef int YYSTYPE; /* Line 214 of yacc.c. */ -#line 221 "compile.tab.C" +#line 222 "compile.tab.C" #if ! defined (yyoverflow) || YYERROR_VERBOSE @@ -456,24 +457,24 @@ static const short int yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 132, 132, 139, 141, 141, 142, 144, 144, 146, - 253, 253, 254, 254, 255, 256, 256, 258, 258, 306, - 306, 307, 308, 308, 309, 309, 311, 311, 315, 315, - 317, 317, 318, 318, 319, 319, 319, 323, 364, 365, - 365, 366, 368, 369, 370, 423, 424, 424, 428, 441, - 442, 443, 444, 470, 475, 478, 479, 480, 482, 485, - 482, 493, 501, 508, 509, 510, 512, 518, 519, 519, - 523, 535, 538, 535, 582, 584, 584, 586, 587, 588, - 590, 593, 590, 596, 597, 599, 600, 603, 604, 607, - 608, 610, 613, 627, 632, 633, 634, 639, 639, 641, - 641, 642, 643, 651, 656, 659, 660, 661, 662, 664, - 668, 677, 680, 677, 688, 693, 693, 694, 700, 701, - 703, 716, 728, 730, 731, 732, 733, 734, 735, 736, - 737, 739, 740, 741, 742, 743, 744, 745, 746, 748, - 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, - 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, - 769, 770, 771, 772, 773, 774, 777, 782, 803, 808, - 809, 810, 812 + 0, 133, 133, 140, 142, 142, 143, 145, 145, 147, + 256, 256, 257, 257, 258, 259, 259, 261, 261, 309, + 309, 310, 311, 311, 312, 312, 314, 314, 318, 318, + 320, 320, 321, 321, 322, 322, 322, 326, 367, 368, + 368, 369, 371, 372, 373, 426, 427, 427, 431, 444, + 445, 446, 447, 473, 478, 481, 482, 483, 485, 488, + 485, 496, 504, 511, 512, 513, 515, 521, 522, 522, + 526, 538, 541, 538, 586, 588, 588, 590, 591, 592, + 594, 597, 594, 600, 601, 603, 604, 607, 608, 611, + 612, 614, 617, 631, 636, 637, 638, 643, 643, 645, + 645, 646, 647, 655, 660, 663, 664, 665, 666, 668, + 672, 681, 684, 681, 692, 697, 697, 698, 704, 705, + 707, 720, 732, 734, 735, 736, 737, 738, 739, 740, + 741, 743, 744, 745, 746, 747, 748, 749, 750, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, + 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, + 773, 774, 775, 776, 777, 778, 781, 786, 807, 812, + 813, 814, 816 }; #endif @@ -516,7 +517,7 @@ static const char *const yytname[] = "subvar_ref_name_rdive", "subvar_get_writes", "subvar__get_write", "class_prefix", "class_static_prefix", "class_constructor_prefix", "expr_value", "expr", "double_or_STRING", "string_inside_quotes_value", - "write_string", "void_value", "true_value", "false_value", "empty", 0 + "write_string", "empty_value", "true_value", "false_value", "empty", 0 }; #endif @@ -1428,7 +1429,7 @@ yyreduce: switch (yyn) { case 2: -#line 132 "compile.y" +#line 133 "compile.y" { Method* method=new Method(Method::CT_ANY, 0, 0, /*min, max numbered_params_count*/ @@ -1439,9 +1440,9 @@ yyreduce: break; case 9: -#line 147 "compile.y" +#line 148 "compile.y" { - const String& command=*LA2S(*yyvsp[-2]); + const String& command=LA2S(*yyvsp[-2])->trim(String::TRIM_END); YYSTYPE strings_code=yyvsp[0]; if(strings_code->count()<1*OPERATIONS_PER_OPVALUE) { strcpy(PC.error, "@"); @@ -1451,8 +1452,9 @@ yyreduce: } if(command==CLASS_NAME) { if(strings_code->count()==1*OPERATIONS_PER_OPVALUE) { + PC.class_add(); // new class' name - const String& name=*LA2S(*strings_code); + const String& name=LA2S(*strings_code)->trim(String::TRIM_END); // creating the class VStateless_class* cclass=new VClass; PC.cclass_new=cclass; @@ -1462,8 +1464,9 @@ yyreduce: YYERROR; } } else if(command==USE_CONTROL_METHOD_NAME) { + PC.class_add(); for(size_t i=0; icount(); i+=OPERATIONS_PER_OPVALUE) - PC.request.use_file(PC.request.main_class, *LA2S(*strings_code, i), PC.request.get_used_filename(PC.file_no)); + PC.request.use_file(PC.request.main_class, LA2S(*strings_code, i)->trim(String::TRIM_END), PC.request.get_used_filename(PC.file_no)); } else if(command==BASE_NAME) { if(PC.append){ strcpy(PC.error, "can't set base while appending methods to class '"); @@ -1479,7 +1482,7 @@ yyreduce: YYERROR; } if(strings_code->count()==1*OPERATIONS_PER_OPVALUE) { - const String& base_name=*LA2S(*strings_code); + const String& base_name=LA2S(*strings_code)->trim(String::TRIM_END); if(Value* base_class_value=PC.request.get_class(base_name)) { // @CLASS == @BASE sanity check if(VStateless_class *base_class=base_class_value->get_class()) { @@ -1504,7 +1507,7 @@ yyreduce: } } else if(command==OPTIONS_CONTROL_METHOD_NAME) { for(size_t i=0; icount(); i+=OPERATIONS_PER_OPVALUE) { - const String& option=*LA2S(*strings_code, i); + const String& option=LA2S(*strings_code, i)->trim(String::TRIM_END); if(option==OPTION_ALL_VARS_LOCAL_NAME){ PC.set_all_vars_local(); } else if(option==OPTION_PARTIAL_CLASS){ @@ -1549,12 +1552,12 @@ yyreduce: break; case 13: -#line 254 "compile.y" - { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} +#line 257 "compile.y" + { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]); ;} break; case 17: -#line 258 "compile.y" +#line 261 "compile.y" { PC.class_add(); PC.explicit_result=false; @@ -1597,7 +1600,7 @@ yyreduce: break; case 18: -#line 296 "compile.y" +#line 299 "compile.y" { Method* method=reinterpret_cast(yyvsp[-1]); // fill in the code @@ -1610,22 +1613,22 @@ yyreduce: break; case 21: -#line 307 "compile.y" - {yyval=yyvsp[-1];} +#line 310 "compile.y" + {yyval=yyvsp[-1];;} break; case 25: -#line 309 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]) ;} +#line 312 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); ;} break; case 31: -#line 317 "compile.y" - { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} +#line 320 "compile.y" + { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]); ;} break; case 37: -#line 323 "compile.y" +#line 326 "compile.y" { yyval=N(); YYSTYPE code=yyvsp[0]; @@ -1670,17 +1673,17 @@ yyreduce: break; case 38: -#line 364 "compile.y" - { yyval=yyvsp[0] ;} +#line 367 "compile.y" + { yyval=yyvsp[0]; ;} break; case 41: -#line 366 "compile.y" - { yyval=yyvsp[-1] ;} +#line 369 "compile.y" + { yyval=yyvsp[-1]; ;} break; case 44: -#line 370 "compile.y" +#line 373 "compile.y" { yyval=N(); YYSTYPE diving_code=yyvsp[0]; @@ -1737,17 +1740,17 @@ yyreduce: break; case 45: -#line 423 "compile.y" - { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} +#line 426 "compile.y" + { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]); ;} break; case 47: -#line 424 "compile.y" - { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} +#line 427 "compile.y" + { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]); ;} break; case 48: -#line 428 "compile.y" +#line 431 "compile.y" { yyval=N(); #ifdef OPTIMIZE_BYTECODE_CONSTRUCT @@ -1763,7 +1766,7 @@ yyreduce: break; case 52: -#line 444 "compile.y" +#line 447 "compile.y" { yyval=N(); YYSTYPE diving_code=yyvsp[0]; @@ -1793,7 +1796,7 @@ yyreduce: break; case 53: -#line 470 "compile.y" +#line 473 "compile.y" { yyval=N(); O(*yyval, OP::OP_WITH_WRITE); /* stack: starting context */ @@ -1802,12 +1805,12 @@ yyreduce: break; case 54: -#line 475 "compile.y" - { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} +#line 478 "compile.y" + { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]); ;} break; case 58: -#line 482 "compile.y" +#line 485 "compile.y" { // allow $result_or_other_variable[ letters here any time ] *reinterpret_cast(&yyval)=PC.explicit_result; PC.explicit_result=false; @@ -1815,14 +1818,14 @@ yyreduce: break; case 59: -#line 485 "compile.y" +#line 488 "compile.y" { PC.explicit_result=*reinterpret_cast(&yyvsp[-1]); ;} break; case 60: -#line 487 "compile.y" +#line 490 "compile.y" { // stack: context, name yyval=yyvsp[-2]; // stack: context, name, value @@ -1831,7 +1834,7 @@ yyreduce: break; case 61: -#line 493 "compile.y" +#line 496 "compile.y" { yyval=N(); O(*yyval, OP::OP_PREPARE_TO_EXPRESSION); @@ -1842,7 +1845,7 @@ yyreduce: break; case 62: -#line 501 "compile.y" +#line 504 "compile.y" { // stack: context, name yyval=N(); @@ -1851,7 +1854,7 @@ yyreduce: break; case 66: -#line 512 "compile.y" +#line 515 "compile.y" { yyval=N(); OA(*yyval, OP::OP_OBJECT_POOL, yyvsp[0]); /* stack: empty write context */ @@ -1861,12 +1864,12 @@ yyreduce: break; case 69: -#line 519 "compile.y" - { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} +#line 522 "compile.y" + { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]); ;} break; case 70: -#line 523 "compile.y" +#line 526 "compile.y" { #ifdef OPTIMIZE_BYTECODE_CUT_REM_OPERATOR if((*yyvsp[0]).count()) @@ -1882,21 +1885,21 @@ yyreduce: break; case 71: -#line 535 "compile.y" +#line 538 "compile.y" { PC.in_call_value=true; ;} break; case 72: -#line 538 "compile.y" +#line 541 "compile.y" { PC.in_call_value=false; ;} break; case 73: -#line 541 "compile.y" +#line 544 "compile.y" { /* ^field.$method{vasya} */ #ifdef OPTIMIZE_BYTECODE_CUT_REM_OPERATOR #ifdef OPTIMIZE_BYTECODE_GET_ELEMENT @@ -1912,8 +1915,9 @@ yyreduce: YYSTYPE params_code=yyvsp[-1]; if(params_code->count()==3) { // probably [] case. [OP::OP_VALUE+origin+Void] if(Value* value=LA2V(*params_code)) // it is OP_VALUE+origin+value? - if(value->is_void()) // value is VVoid? - params_code=0; // ^zzz[] case. don't append lone empty param. + if(const String * string=value->get_string()) + if(string->is_empty()) // value is empty string? + params_code=0; // ^zzz[] case. don't append lone empty param. } /* stack: context, method_junction */ @@ -1940,12 +1944,12 @@ yyreduce: break; case 76: -#line 584 "compile.y" - { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} +#line 588 "compile.y" + { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]); ;} break; case 80: -#line 590 "compile.y" +#line 594 "compile.y" { // allow ^call[ letters here any time ] *reinterpret_cast(&yyval)=PC.explicit_result; PC.explicit_result=false; @@ -1953,51 +1957,51 @@ yyreduce: break; case 81: -#line 593 "compile.y" +#line 597 "compile.y" { PC.explicit_result=*reinterpret_cast(&yyvsp[-1]); ;} break; case 82: -#line 595 "compile.y" - {yyval=yyvsp[-2];} +#line 599 "compile.y" + {yyval=yyvsp[-2];;} break; case 83: -#line 596 "compile.y" - {yyval=yyvsp[-1];} +#line 600 "compile.y" + {yyval=yyvsp[-1];;} break; case 84: -#line 597 "compile.y" - {yyval=yyvsp[-1];} +#line 601 "compile.y" + {yyval=yyvsp[-1];;} break; case 86: -#line 600 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]) ;} +#line 604 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); ;} break; case 88: -#line 604 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]) ;} +#line 608 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); ;} break; case 90: -#line 608 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]) ;} +#line 612 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); ;} break; case 91: -#line 610 "compile.y" +#line 614 "compile.y" { yyval=yyvsp[0]; ;} break; case 92: -#line 613 "compile.y" +#line 617 "compile.y" { YYSTYPE expr_code=yyvsp[0]; if(expr_code->count()==3 @@ -2015,7 +2019,7 @@ yyreduce: break; case 93: -#line 627 "compile.y" +#line 631 "compile.y" { yyval=N(); OA(*yyval, OP::OP_CURLY_CODE__STORE_PARAM, yyvsp[0]); @@ -2023,17 +2027,17 @@ yyreduce: break; case 98: -#line 639 "compile.y" - { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} +#line 643 "compile.y" + { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]); ;} break; case 100: -#line 641 "compile.y" - { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} +#line 645 "compile.y" + { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]); ;} break; case 102: -#line 643 "compile.y" +#line 647 "compile.y" { // we know that name_advance1 not called from ^xxx context // so we'll not check for operator call possibility as we do in name_advance2 @@ -2045,7 +2049,7 @@ yyreduce: break; case 103: -#line 651 "compile.y" +#line 655 "compile.y" { /* stack: context */ yyval=yyvsp[0]; /* stack: context,name */ @@ -2054,7 +2058,7 @@ yyreduce: break; case 109: -#line 664 "compile.y" +#line 668 "compile.y" { yyval=yyvsp[0]; O(*yyval, OP::OP_GET_ELEMENT); @@ -2062,7 +2066,7 @@ yyreduce: break; case 110: -#line 668 "compile.y" +#line 672 "compile.y" { YYSTYPE code; { @@ -2075,7 +2079,7 @@ yyreduce: break; case 111: -#line 677 "compile.y" +#line 681 "compile.y" { // allow $result_or_other_variable[ letters here any time ] *reinterpret_cast(&yyval)=PC.explicit_result; PC.explicit_result=false; @@ -2083,14 +2087,14 @@ yyreduce: break; case 112: -#line 680 "compile.y" +#line 684 "compile.y" { PC.explicit_result=*reinterpret_cast(&yyvsp[-1]); ;} break; case 113: -#line 682 "compile.y" +#line 686 "compile.y" { yyval=N(); OA(*yyval, OP::OP_OBJECT_POOL, yyvsp[-2]); /* stack: empty write context */ @@ -2100,7 +2104,7 @@ yyreduce: break; case 114: -#line 688 "compile.y" +#line 692 "compile.y" { yyval=N(); O(*yyval, OP::OP_WITH_READ); @@ -2109,12 +2113,12 @@ yyreduce: break; case 116: -#line 693 "compile.y" - { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} +#line 697 "compile.y" + { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]); ;} break; case 117: -#line 694 "compile.y" +#line 698 "compile.y" { yyval=yyvsp[0]; O(*yyval, OP::OP_GET_ELEMENT__WRITE); @@ -2122,7 +2126,7 @@ yyreduce: break; case 120: -#line 703 "compile.y" +#line 707 "compile.y" { yyval=yyvsp[-1]; // stack: class name string if(*LA2S(*yyval) == BASE_NAME) { // pseudo BASE class @@ -2134,12 +2138,12 @@ yyreduce: } } // optimized OP_VALUE+origin+string+OP_GET_CLASS => OP_VALUE__GET_CLASS+origin+string - maybe_change_first_opcode(*yyval, OP::OP_VALUE, OP::OP_VALUE__GET_CLASS) + maybe_change_first_opcode(*yyval, OP::OP_VALUE, OP::OP_VALUE__GET_CLASS); ;} break; case 121: -#line 716 "compile.y" +#line 720 "compile.y" { yyval=yyvsp[-1]; if(!PC.in_call_value) { @@ -2151,197 +2155,197 @@ yyreduce: break; case 128: -#line 735 "compile.y" - { yyval = yyvsp[-1] ;} +#line 739 "compile.y" + { yyval = yyvsp[-1]; ;} break; case 129: -#line 736 "compile.y" - { yyval = yyvsp[-1] ;} +#line 740 "compile.y" + { yyval = yyvsp[-1]; ;} break; case 130: -#line 737 "compile.y" +#line 741 "compile.y" { yyval = yyvsp[-1]; ;} break; case 131: -#line 739 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP::OP_NEG) ;} +#line 743 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP::OP_NEG); ;} break; case 132: -#line 740 "compile.y" - { yyval=yyvsp[0] ;} +#line 744 "compile.y" + { yyval=yyvsp[0]; ;} break; case 133: -#line 741 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP::OP_INV) ;} +#line 745 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP::OP_INV); ;} break; case 134: -#line 742 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP::OP_NOT) ;} +#line 746 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP::OP_NOT); ;} break; case 135: -#line 743 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP::OP_DEF) ;} +#line 747 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP::OP_DEF); ;} break; case 136: -#line 744 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP::OP_IN) ;} +#line 748 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP::OP_IN); ;} break; case 137: -#line 745 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP::OP_FEXISTS) ;} +#line 749 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP::OP_FEXISTS); ;} break; case 138: -#line 746 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP::OP_DEXISTS) ;} +#line 750 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP::OP_DEXISTS); ;} break; case 139: -#line 748 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_SUB) ;} +#line 752 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_SUB); ;} break; case 140: -#line 749 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_ADD) ;} +#line 753 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_ADD); ;} break; case 141: -#line 750 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_MUL) ;} +#line 754 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_MUL); ;} break; case 142: -#line 751 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_DIV) ;} +#line 755 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_DIV); ;} break; case 143: -#line 752 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_MOD) ;} +#line 756 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_MOD); ;} break; case 144: -#line 753 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_INTDIV) ;} +#line 757 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_INTDIV); ;} break; case 145: -#line 754 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_BIN_SL) ;} +#line 758 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_BIN_SL); ;} break; case 146: -#line 755 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_BIN_SR) ;} +#line 759 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_BIN_SR); ;} break; case 147: -#line 756 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_BIN_AND) ;} +#line 760 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_BIN_AND); ;} break; case 148: -#line 757 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_BIN_OR) ;} +#line 761 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_BIN_OR); ;} break; case 149: -#line 758 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_BIN_XOR) ;} +#line 762 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_BIN_XOR); ;} break; case 150: -#line 759 "compile.y" - { yyval=yyvsp[-2]; OA(*yyval, OP::OP_NESTED_CODE, yyvsp[0]); O(*yyval, OP::OP_LOG_AND) ;} +#line 763 "compile.y" + { yyval=yyvsp[-2]; OA(*yyval, OP::OP_NESTED_CODE, yyvsp[0]); O(*yyval, OP::OP_LOG_AND); ;} break; case 151: -#line 760 "compile.y" - { yyval=yyvsp[-2]; OA(*yyval, OP::OP_NESTED_CODE, yyvsp[0]); O(*yyval, OP::OP_LOG_OR) ;} +#line 764 "compile.y" + { yyval=yyvsp[-2]; OA(*yyval, OP::OP_NESTED_CODE, yyvsp[0]); O(*yyval, OP::OP_LOG_OR); ;} break; case 152: -#line 761 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_LOG_XOR) ;} +#line 765 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_LOG_XOR); ;} break; case 153: -#line 762 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_NUM_LT) ;} +#line 766 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_NUM_LT); ;} break; case 154: -#line 763 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_NUM_GT) ;} +#line 767 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_NUM_GT); ;} break; case 155: -#line 764 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_NUM_LE) ;} +#line 768 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_NUM_LE); ;} break; case 156: -#line 765 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_NUM_GE) ;} +#line 769 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_NUM_GE); ;} break; case 157: -#line 766 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_NUM_EQ) ;} +#line 770 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_NUM_EQ); ;} break; case 158: -#line 767 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_NUM_NE) ;} +#line 771 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_NUM_NE); ;} break; case 159: -#line 768 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_STR_LT) ;} +#line 772 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_STR_LT); ;} break; case 160: -#line 769 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_STR_GT) ;} +#line 773 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_STR_GT); ;} break; case 161: -#line 770 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_STR_LE) ;} +#line 774 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_STR_LE); ;} break; case 162: -#line 771 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_STR_GE) ;} +#line 775 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_STR_GE); ;} break; case 163: -#line 772 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_STR_EQ) ;} +#line 776 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_STR_EQ); ;} break; case 164: -#line 773 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_STR_NE) ;} +#line 777 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_STR_NE); ;} break; case 165: -#line 774 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_IS) ;} +#line 778 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP::OP_IS); ;} break; case 166: -#line 777 "compile.y" +#line 781 "compile.y" { // optimized OP_STRING => OP_VALUE for doubles maybe_change_string_literal_to_double_literal(*(yyval=yyvsp[0])); @@ -2349,7 +2353,7 @@ yyreduce: break; case 167: -#line 782 "compile.y" +#line 786 "compile.y" { #ifdef OPTIMIZE_BYTECODE_STRING_POOL // it brakes ^if(" 09 "){...} @@ -2371,38 +2375,38 @@ yyreduce: break; case 168: -#line 803 "compile.y" +#line 807 "compile.y" { // optimized OP_STRING+OP_WRITE_VALUE => OP_STRING__WRITE - change_string_literal_to_write_string_literal(*(yyval=yyvsp[0])) + change_string_literal_to_write_string_literal(*(yyval=yyvsp[0])); ;} break; case 169: -#line 808 "compile.y" - { yyval=VL(/*we know that we will not change it*/const_cast(&vvoid), 0, 0, 0) ;} +#line 812 "compile.y" + { yyval=VL(/*we know that we will not change it*/const_cast(&vempty), 0, 0, 0); ;} break; case 170: -#line 809 "compile.y" - { yyval = VL(/*we know that we will not change it*/const_cast(&vtrue), 0, 0, 0) ;} +#line 813 "compile.y" + { yyval = VL(/*we know that we will not change it*/const_cast(&vtrue), 0, 0, 0); ;} break; case 171: -#line 810 "compile.y" - { yyval = VL(/*we know that we will not change it*/const_cast(&vfalse), 0, 0, 0) ;} +#line 814 "compile.y" + { yyval = VL(/*we know that we will not change it*/const_cast(&vfalse), 0, 0, 0); ;} break; case 172: -#line 812 "compile.y" - { yyval=N() ;} +#line 816 "compile.y" + { yyval=N(); ;} break; } /* Line 1010 of yacc.c. */ -#line 2406 "compile.tab.C" +#line 2410 "compile.tab.C" yyvsp -= yylen; yyssp -= yylen; @@ -2627,7 +2631,7 @@ yyreturn: } -#line 814 "compile.y" +#line 818 "compile.y" #endif