Changeset 2847 in webkit for trunk/JavaScriptCore
- Timestamp:
- Nov 24, 2002, 2:12:02 AM (23 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r2846 r2847 1 2002-11-24 Maciej Stachowiak <[email protected]> 2 3 - fixed 3095446 - Crash on AppleScript page due to very long argument list 4 5 * kjs/grammar.y: Don't try to construct the argument list in the 6 right order, since that blows out the parser stack. 7 * kjs/nodes.cpp: 8 (ArgumentsNode::ArgumentsNode): Instead reverse the argument list 9 here. 10 * kjs/nodes.h: Make ArgumentsNode a friend of ArgumentListNode. 11 * kjs/grammar.cpp: Updated from grammar.y. 12 1 13 2002-11-23 Maciej Stachowiak <[email protected]> 2 14 -
trunk/JavaScriptCore/ChangeLog-2002-12-03
r2846 r2847 1 2002-11-24 Maciej Stachowiak <[email protected]> 2 3 - fixed 3095446 - Crash on AppleScript page due to very long argument list 4 5 * kjs/grammar.y: Don't try to construct the argument list in the 6 right order, since that blows out the parser stack. 7 * kjs/nodes.cpp: 8 (ArgumentsNode::ArgumentsNode): Instead reverse the argument list 9 here. 10 * kjs/nodes.h: Make ArgumentsNode a friend of ArgumentListNode. 11 * kjs/grammar.cpp: Updated from grammar.y. 12 1 13 2002-11-23 Maciej Stachowiak <[email protected]> 2 14 -
trunk/JavaScriptCore/ChangeLog-2003-10-25
r2846 r2847 1 2002-11-24 Maciej Stachowiak <[email protected]> 2 3 - fixed 3095446 - Crash on AppleScript page due to very long argument list 4 5 * kjs/grammar.y: Don't try to construct the argument list in the 6 right order, since that blows out the parser stack. 7 * kjs/nodes.cpp: 8 (ArgumentsNode::ArgumentsNode): Instead reverse the argument list 9 here. 10 * kjs/nodes.h: Make ArgumentsNode a friend of ArgumentListNode. 11 * kjs/grammar.cpp: Updated from grammar.y. 12 1 13 2002-11-23 Maciej Stachowiak <[email protected]> 2 14 -
trunk/JavaScriptCore/kjs/grammar.cpp
r2760 r2847 256 256 93, 96, 0, 95, 96, 0, 95, 66, 114, 67, 257 257 0, 95, 70, 58, 0, 62, 63, 0, 62, 97, 258 63, 0, 112, 0, 112, 68, 97, 0, 94, 0,258 63, 0, 112, 0, 97, 68, 112, 0, 94, 0, 259 259 95, 0, 98, 0, 98, 42, 0, 98, 43, 0, 260 260 99, 0, 18, 100, 0, 17, 100, 0, 26, 100, … … 319 319 200, 203, 205, 208, 210, 214, 216, 217, 220, 222, 320 320 223, 224, 225, 228, 230, 233, 235, 236, 237, 241, 321 243, 246, 24 9, 255, 257, 260, 262, 263, 266, 268,322 26 9, 270, 271, 272, 273, 274, 275, 276, 277, 278,323 2 81, 283, 284, 285, 288, 290, 291, 294, 296, 297,324 29 8, 301, 303, 305, 307, 309, 311, 313, 317, 319,325 3 20, 321, 322, 325, 327, 330, 332, 335, 337, 340,326 3 42, 346, 348, 352, 354, 358, 360, 364, 366, 367,327 36 8, 369, 370, 371, 372, 373, 374, 375, 376, 379,328 3 81, 384, 386, 387, 388, 389, 390, 391, 392, 393,329 39 4, 395, 396, 397, 398, 401, 403, 406, 408, 411,330 41 4, 423, 425, 429, 431, 434, 438, 442, 445, 452,331 45 4, 458, 460, 461, 464, 467, 470, 474, 480, 482,332 48 5, 487, 491, 493, 500, 502, 506, 508, 516, 518,333 5 22, 523, 529, 534, 539, 541, 545, 547, 550, 552,334 55 5, 557, 560, 562, 565, 571, 575, 577, 578, 581,335 58 5, 589, 592, 596, 598, 603, 605, 609, 612, 616,336 61 9, 623, 626, 632, 634321 243, 246, 248, 251, 253, 256, 258, 259, 262, 264, 322 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 323 277, 279, 280, 281, 284, 286, 287, 290, 292, 293, 324 294, 297, 299, 301, 303, 305, 307, 309, 313, 315, 325 316, 317, 318, 321, 323, 326, 328, 331, 333, 336, 326 338, 342, 344, 348, 350, 354, 356, 360, 362, 363, 327 364, 365, 366, 367, 368, 369, 370, 371, 372, 375, 328 377, 380, 382, 383, 384, 385, 386, 387, 388, 389, 329 390, 391, 392, 393, 394, 397, 399, 402, 404, 407, 330 410, 419, 421, 425, 427, 430, 434, 438, 441, 448, 331 450, 454, 456, 457, 460, 463, 466, 470, 476, 478, 332 481, 483, 487, 489, 496, 498, 502, 504, 512, 514, 333 518, 519, 525, 530, 535, 537, 541, 543, 546, 548, 334 551, 553, 556, 558, 561, 567, 571, 573, 574, 577, 335 581, 585, 588, 592, 594, 599, 601, 605, 608, 612, 336 615, 619, 622, 628, 630 337 337 }; 338 338 #endif … … 474 474 -32768,-32768, 1066, 230, 1066,-32768, 1066, 1066, -45, 483, 475 475 162,-32768,-32768, 705,-32768,-32768, -6, 150, 176, 50, 476 220, -37, 185, 212,-32768, 154, 850, 196,-32768,-32768,477 -32768,-32768, 922, 1066, 2 24,-32768, 1066, 234,-32768,-32768,476 220, -37, 185, 212,-32768, 154, 850, 214,-32768,-32768, 477 -32768,-32768, 922, 1066, 234,-32768, 1066, 237,-32768,-32768, 478 478 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 479 479 -32768,-32768,-32768, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 480 480 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 481 481 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066,-32768, 1066, 482 -32768,-32768,-32768,-32768, 244, 87, 2 38, 225,-32768,-32768,482 -32768,-32768,-32768,-32768, 244, 87, 241, 226,-32768,-32768, 483 483 -32768,-32768,-32768, 1066,-32768,-32768, -24,-32768,-32768,-32768, 484 64,-32768, 24 3, 100,-32768,-32768, 103, 248, 121, 122,485 124,-32768,-32768, 25 0, 0, 281,-32768,-32768,-32768,-32768,486 35, 1066,-32768,-32768, 12,-32768,-32768,-32768,-32768, 252,487 249, 223,-32768, 228,-32768,-32768,-32768,-32768,-32768, 71,484 64,-32768, 248, 100,-32768,-32768, 103, 252, 121, 122, 485 124,-32768,-32768, 253, 0, 283,-32768,-32768,-32768,-32768, 486 35, 1066,-32768,-32768, 12,-32768,-32768,-32768,-32768, 181, 487 -32768, 203,-32768, 223,-32768,-32768,-32768,-32768,-32768, 71, 488 488 71, -25, -25, -25, 38, 38, 38, 38, 38, 38, 489 82, 82, 82, 82, 239, 239, 239, 84, 133, 24 7,490 -32768, -15, -41, 1066, 1066,-32768,-32768, 24 3, 181, 557,491 -32768, 24 3, 260, 705, 1066, 705, 255, 705, 262,-32768,492 -32768, 25 3,-32768, 994,-32768, 1066,-32768,-32768, 1066, 1066,493 29 9, 1066, 190, 241,-32768, 243,-32768, 264,-32768,-32768,494 307, 19 7,-32768, 323,-32768,-32768, 270, 1066,-32768,-32768,495 -32768,-32768, 199, 1066, 259, 705, 1066,-32768,-32768, 705,496 -32768, 1066, 23, 323,-32768, 0,-32768, 705, 20 0, 1066,497 -32768, 274,-32768, 2 29, 275,-32768, 323,-32768,-32768,-32768,498 705, 28 2, 705, 705, 705, 283,-32768, 705,-32768,-32768,499 705, 705,-32768,-32768,-32768, 34 6, 349,-32768489 82, 82, 82, 82, 239, 239, 239, 84, 133, 249, 490 -32768, -15, -41, 1066, 1066,-32768,-32768, 248, 190, 557, 491 -32768, 248, 259, 705, 1066, 705, 255, 705, 262,-32768, 492 -32768, 254,-32768, 994,-32768, 1066,-32768,-32768, 1066, 1066, 493 298, 1066, 197, 245,-32768, 248,-32768, 260,-32768,-32768, 494 307, 199,-32768, 323,-32768,-32768, 270, 1066,-32768,-32768, 495 -32768,-32768, 200, 1066, 261, 705, 1066,-32768,-32768, 705, 496 -32768, 1066, 23, 323,-32768, 0,-32768, 705, 201, 1066, 497 -32768, 274,-32768, 232, 275,-32768, 323,-32768,-32768,-32768, 498 705, 280, 705, 705, 705, 281,-32768, 705,-32768,-32768, 499 705, 705,-32768,-32768,-32768, 348, 349,-32768 500 500 }; 501 501 502 502 static const short yypgoto[] = {-32768, 503 -32768,-32768,-32768, 126,-32768,-32768, 135, 3 51, 352,-32768,504 -34, 88, 41,-32768, 1, 142, -10, 15, 117, 96,505 -32768,-32768, 1 78, 198,-32768,-32768, -122,-32768, -9, -17,506 -22, 2 8,-32768, 191, 182, 118,-32768,-32768,-32768,-32768,507 -225,-32768,-32768,-32768,-32768,-32768,-32768, 44,-32768, 5 8,508 -32768,-32768,-32768,-32768,-32768, 16 7,-32768,-32768, 183, -223,503 -32768,-32768,-32768, 126,-32768,-32768, 135, 346, 351,-32768, 504 -34,-32768, 41,-32768, 1, 148, -10, 15, 117, 123, 505 -32768,-32768, 184, 196,-32768,-32768, -122,-32768, -9, -17, 506 -22, 29,-32768, 191, 178, 118,-32768,-32768,-32768,-32768, 507 -225,-32768,-32768,-32768,-32768,-32768,-32768, 44,-32768, 55, 508 -32768,-32768,-32768,-32768,-32768, 166,-32768,-32768, 182, -223, 509 509 -32768, 2,-32768 510 510 }; … … 531 531 149, 150, 151, 152, 133, 156, 157, 174, 137, 242, 532 532 243, 244, 138, 140, 141, 237, 238, 239, 167, 168, 533 26, 310, 272, 231, 175, 274, 312, 273, 85, 153,533 26, 310, 272, 311, 175, 274, 312, 273, 85, 153, 534 534 180, 30, 31, 176, 86, 96, 33, 245, 246, 247, 535 535 248, 249, 250, 276, 277, 327, 278, 194, 180, 180, … … 539 539 224, 225, -126, -126, -126, -126, -126, -126, -126, -126, 540 540 -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, 541 -126, -126, -126, 2 96, -28, -126, -126, -126, 273, -126,542 -126, 208, 316, 222, 293, 187, 301, 180, 303, 321,543 306, 32 8, 341, 228, 180, 302, 180, 180, 255, 256,544 257, 298, 169, 170, 171, 172, 223, -126, -126, -126,545 313, 2 33, 187, -126, -126, 251, 252, 253, 254, 287,546 180, 23 5, -126, -126, 288, 180, 180, 344, 331, 240,547 241, 262, 333, 339, 329, 180, 270, 187, 265, 275,548 340, 27 9, 334, 215, 285, 289, 286, 300, 304, 307,549 187, 3 08, 314, 347, 317, 349, 350, 350, 319, 320,541 -126, -126, -126, 285, -28, -126, -126, -126, 286, -126, 542 -126, 208, 296, 222, 293, 187, 301, 273, 303, 316, 543 306, 321, 328, 341, 180, 302, 180, 180, 180, 287, 544 180, 298, 169, 170, 171, 172, 223, -126, -126, -126, 545 313, 228, 187, -126, -126, 251, 252, 253, 254, 288, 546 180, 233, -126, -126, 235, 255, 256, 257, 331, 180, 547 344, 262, 333, 339, 329, 240, 241, 187, 180, 265, 548 340, 270, 334, 275, 279, 215, 300, 289, 304, 307, 549 187, 314, 308, 347, 319, 349, 350, 350, 317, 320, 550 550 354, 322, 326, 355, 355, 97, 343, 1, 2, 3, 551 4, 5, 3 30, 345, 348, 357, 8, 353, 358, 84,552 284, 13, 14, 258, 16, 282, 140, 141, 87, 88,551 4, 5, 348, 345, 330, 353, 8, 357, 358, 84, 552 284, 13, 14, 87, 16, 282, 140, 141, 88, 258, 553 553 19, 142, 143, 144, 145, 146, 147, 148, 149, 150, 554 151, 152, 352, 311, 259, 263, 24, 25, 267, 291,555 346, 338, 281, 269, 26, 0, 0, 0, 0, 0,554 151, 152, 259, 352, 267, 263, 24, 25, 338, 291, 555 346, 281, 269, 0, 26, 0, 0, 0, 0, 0, 556 556 0, 0, 85, 28, 29, 30, 31, 153, 86, 0, 557 557 33, 0, 0, 0, 0, 34, 35, 36, 37, 0, … … 658 658 21, 22, 23, 63, 69, 26, 27, 28, 68, 30, 659 659 31, 22, 63, 69, 264, 265, 274, 68, 276, 63, 660 278, 63, 63, 6 8, 68, 275, 68, 68, 173, 174,661 175, 270, 34, 35, 36, 37, 65, 58, 59, 60,662 290, 58, 292, 64, 65, 169, 170, 171, 172, 67,663 68, 58, 73, 74, 67, 68, 68, 69, 316, 158,664 159, 58, 320, 326, 314, 68, 64, 317, 84, 62,665 328, 6 2, 322, 33, 63, 69, 68, 58, 64, 58,666 330, 69, 24, 341, 84, 343, 344, 345, 65, 23,660 278, 63, 63, 63, 68, 275, 68, 68, 68, 67, 661 68, 270, 34, 35, 36, 37, 65, 58, 59, 60, 662 290, 68, 292, 64, 65, 169, 170, 171, 172, 67, 663 68, 58, 73, 74, 58, 173, 174, 175, 316, 68, 664 69, 58, 320, 326, 314, 158, 159, 317, 68, 84, 665 328, 64, 322, 62, 62, 33, 58, 69, 64, 58, 666 330, 24, 69, 341, 65, 343, 344, 345, 84, 23, 667 667 348, 9, 63, 351, 352, 1, 63, 3, 4, 5, 668 6, 7, 84, 69, 63, 0, 12, 65, 0, 15,669 225, 17, 18, 176, 20, 221, 42, 43, 8, 8,668 6, 7, 63, 69, 84, 65, 12, 0, 0, 15, 669 225, 17, 18, 8, 20, 221, 42, 43, 8, 176, 670 670 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 671 56, 57, 345, 286, 177, 185, 42, 43, 197, 262,672 337, 324, 216, 201, 50, -1, -1, -1, -1, -1,671 56, 57, 177, 345, 197, 185, 42, 43, 324, 262, 672 337, 216, 201, -1, 50, -1, -1, -1, -1, -1, 673 673 -1, -1, 58, 59, 60, 61, 62, 83, 64, -1, 674 674 66, -1, -1, -1, -1, 71, 72, 73, 74, -1, … … 1443 1443 break;} 1444 1444 case 43: 1445 #line 24 9"grammar.y"1446 { yyval.alist = new ArgumentListNode(yyvsp[ 0].alist, yyvsp[-2].node); ;1445 #line 248 "grammar.y" 1446 { yyval.alist = new ArgumentListNode(yyvsp[-2].alist, yyvsp[0].node); ; 1447 1447 break;} 1448 1448 case 47: 1449 #line 2 62"grammar.y"1449 #line 258 "grammar.y" 1450 1450 { yyval.node = new PostfixNode(yyvsp[-1].node, OpPlusPlus); ; 1451 1451 break;} 1452 1452 case 48: 1453 #line 2 63"grammar.y"1453 #line 259 "grammar.y" 1454 1454 { yyval.node = new PostfixNode(yyvsp[-1].node, OpMinusMinus); ; 1455 1455 break;} 1456 1456 case 50: 1457 #line 264 "grammar.y" 1458 { yyval.node = new DeleteNode(yyvsp[0].node); ; 1459 break;} 1460 case 51: 1461 #line 265 "grammar.y" 1462 { yyval.node = new VoidNode(yyvsp[0].node); ; 1463 break;} 1464 case 52: 1465 #line 266 "grammar.y" 1466 { yyval.node = new TypeOfNode(yyvsp[0].node); ; 1467 break;} 1468 case 53: 1469 #line 267 "grammar.y" 1470 { yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ; 1471 break;} 1472 case 54: 1457 1473 #line 268 "grammar.y" 1458 { yyval.node = new DeleteNode(yyvsp[0].node); ;1459 break;} 1460 case 5 1:1474 { yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ; 1475 break;} 1476 case 55: 1461 1477 #line 269 "grammar.y" 1462 { yyval.node = new VoidNode(yyvsp[0].node); ;1463 break;} 1464 case 5 2:1478 { yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ; 1479 break;} 1480 case 56: 1465 1481 #line 270 "grammar.y" 1466 { yyval.node = new TypeOfNode(yyvsp[0].node); ;1467 break;} 1468 case 5 3:1482 { yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ; 1483 break;} 1484 case 57: 1469 1485 #line 271 "grammar.y" 1470 { yyval.node = new PrefixNode(OpPlusPlus,yyvsp[0].node); ;1471 break;} 1472 case 5 4:1486 { yyval.node = new UnaryPlusNode(yyvsp[0].node); ; 1487 break;} 1488 case 58: 1473 1489 #line 272 "grammar.y" 1474 { yyval.node = new PrefixNode(OpPlusPlus,yyvsp[0].node); ;1475 break;} 1476 case 5 5:1490 { yyval.node = new NegateNode(yyvsp[0].node); ; 1491 break;} 1492 case 59: 1477 1493 #line 273 "grammar.y" 1478 { yyval.node = new PrefixNode(OpMinusMinus,yyvsp[0].node); ;1479 break;} 1480 case 56:1494 { yyval.node = new BitwiseNotNode(yyvsp[0].node); ; 1495 break;} 1496 case 60: 1481 1497 #line 274 "grammar.y" 1482 { yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;1483 break;}1484 case 57:1485 #line 275 "grammar.y"1486 { yyval.node = new UnaryPlusNode(yyvsp[0].node); ;1487 break;}1488 case 58:1489 #line 276 "grammar.y"1490 { yyval.node = new NegateNode(yyvsp[0].node); ;1491 break;}1492 case 59:1493 #line 277 "grammar.y"1494 { yyval.node = new BitwiseNotNode(yyvsp[0].node); ;1495 break;}1496 case 60:1497 #line 278 "grammar.y"1498 1498 { yyval.node = new LogicalNotNode(yyvsp[0].node); ; 1499 1499 break;} 1500 1500 case 62: 1501 #line 2 83"grammar.y"1501 #line 279 "grammar.y" 1502 1502 { yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '*'); ; 1503 1503 break;} 1504 1504 case 63: 1505 #line 28 4"grammar.y"1505 #line 280 "grammar.y" 1506 1506 { yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '/'); ; 1507 1507 break;} 1508 1508 case 64: 1509 #line 28 5"grammar.y"1509 #line 281 "grammar.y" 1510 1510 { yyval.node = new MultNode(yyvsp[-2].node,yyvsp[0].node,'%'); ; 1511 1511 break;} 1512 1512 case 66: 1513 #line 2 90"grammar.y"1513 #line 286 "grammar.y" 1514 1514 { yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '+'); ; 1515 1515 break;} 1516 1516 case 67: 1517 #line 2 91"grammar.y"1517 #line 287 "grammar.y" 1518 1518 { yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '-'); ; 1519 1519 break;} 1520 1520 case 69: 1521 #line 29 6"grammar.y"1521 #line 292 "grammar.y" 1522 1522 { yyval.node = new ShiftNode(yyvsp[-2].node, OpLShift, yyvsp[0].node); ; 1523 1523 break;} 1524 1524 case 70: 1525 #line 29 7"grammar.y"1525 #line 293 "grammar.y" 1526 1526 { yyval.node = new ShiftNode(yyvsp[-2].node, OpRShift, yyvsp[0].node); ; 1527 1527 break;} 1528 1528 case 71: 1529 #line 29 8"grammar.y"1529 #line 294 "grammar.y" 1530 1530 { yyval.node = new ShiftNode(yyvsp[-2].node, OpURShift, yyvsp[0].node); ; 1531 1531 break;} 1532 1532 case 73: 1533 #line 300 "grammar.y" 1534 { yyval.node = new RelationalNode(yyvsp[-2].node, OpLess, yyvsp[0].node); ; 1535 break;} 1536 case 74: 1537 #line 302 "grammar.y" 1538 { yyval.node = new RelationalNode(yyvsp[-2].node, OpGreater, yyvsp[0].node); ; 1539 break;} 1540 case 75: 1533 1541 #line 304 "grammar.y" 1534 { yyval.node = new RelationalNode(yyvsp[-2].node, OpLess , yyvsp[0].node); ;1535 break;} 1536 case 7 4:1542 { yyval.node = new RelationalNode(yyvsp[-2].node, OpLessEq, yyvsp[0].node); ; 1543 break;} 1544 case 76: 1537 1545 #line 306 "grammar.y" 1538 { yyval.node = new RelationalNode(yyvsp[-2].node, OpGreater , yyvsp[0].node); ;1539 break;} 1540 case 7 5:1546 { yyval.node = new RelationalNode(yyvsp[-2].node, OpGreaterEq, yyvsp[0].node); ; 1547 break;} 1548 case 77: 1541 1549 #line 308 "grammar.y" 1542 { yyval.node = new RelationalNode(yyvsp[-2].node, Op LessEq, yyvsp[0].node); ;1543 break;} 1544 case 7 6:1550 { yyval.node = new RelationalNode(yyvsp[-2].node, OpInstanceOf, yyvsp[0].node); ; 1551 break;} 1552 case 78: 1545 1553 #line 310 "grammar.y" 1546 { yyval.node = new RelationalNode(yyvsp[-2].node, OpGreaterEq, yyvsp[0].node); ;1547 break;}1548 case 77:1549 #line 312 "grammar.y"1550 { yyval.node = new RelationalNode(yyvsp[-2].node, OpInstanceOf, yyvsp[0].node); ;1551 break;}1552 case 78:1553 #line 314 "grammar.y"1554 1554 { yyval.node = new RelationalNode(yyvsp[-2].node, OpIn, yyvsp[0].node); ; 1555 1555 break;} 1556 1556 case 80: 1557 #line 31 9"grammar.y"1557 #line 315 "grammar.y" 1558 1558 { yyval.node = new EqualNode(yyvsp[-2].node, OpEqEq, yyvsp[0].node); ; 1559 1559 break;} 1560 1560 case 81: 1561 #line 3 20"grammar.y"1561 #line 316 "grammar.y" 1562 1562 { yyval.node = new EqualNode(yyvsp[-2].node, OpNotEq, yyvsp[0].node); ; 1563 1563 break;} 1564 1564 case 82: 1565 #line 3 21"grammar.y"1565 #line 317 "grammar.y" 1566 1566 { yyval.node = new EqualNode(yyvsp[-2].node, OpStrEq, yyvsp[0].node); ; 1567 1567 break;} 1568 1568 case 83: 1569 #line 3 22"grammar.y"1569 #line 318 "grammar.y" 1570 1570 { yyval.node = new EqualNode(yyvsp[-2].node, OpStrNEq, yyvsp[0].node);; 1571 1571 break;} 1572 1572 case 85: 1573 #line 32 7"grammar.y"1573 #line 323 "grammar.y" 1574 1574 { yyval.node = new BitOperNode(yyvsp[-2].node, OpBitAnd, yyvsp[0].node); ; 1575 1575 break;} 1576 1576 case 87: 1577 #line 3 32"grammar.y"1577 #line 328 "grammar.y" 1578 1578 { yyval.node = new BitOperNode(yyvsp[-2].node, OpBitXOr, yyvsp[0].node); ; 1579 1579 break;} 1580 1580 case 89: 1581 #line 33 7"grammar.y"1581 #line 333 "grammar.y" 1582 1582 { yyval.node = new BitOperNode(yyvsp[-2].node, OpBitOr, yyvsp[0].node); ; 1583 1583 break;} 1584 1584 case 91: 1585 #line 3 43"grammar.y"1585 #line 339 "grammar.y" 1586 1586 { yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpAnd, yyvsp[0].node); ; 1587 1587 break;} 1588 1588 case 93: 1589 #line 34 9"grammar.y"1589 #line 345 "grammar.y" 1590 1590 { yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpOr, yyvsp[0].node); ; 1591 1591 break;} 1592 1592 case 95: 1593 #line 35 5"grammar.y"1593 #line 351 "grammar.y" 1594 1594 { yyval.node = new ConditionalNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ; 1595 1595 break;} 1596 1596 case 97: 1597 #line 357 "grammar.y" 1598 { yyval.node = new AssignNode(yyvsp[-2].node, yyvsp[-1].op, yyvsp[0].node);; 1599 break;} 1600 case 98: 1597 1601 #line 361 "grammar.y" 1598 { yyval.node = new AssignNode(yyvsp[-2].node, yyvsp[-1].op, yyvsp[0].node);; 1599 break;} 1600 case 98: 1602 { yyval.op = OpEqual; ; 1603 break;} 1604 case 99: 1605 #line 362 "grammar.y" 1606 { yyval.op = OpPlusEq; ; 1607 break;} 1608 case 100: 1609 #line 363 "grammar.y" 1610 { yyval.op = OpMinusEq; ; 1611 break;} 1612 case 101: 1613 #line 364 "grammar.y" 1614 { yyval.op = OpMultEq; ; 1615 break;} 1616 case 102: 1601 1617 #line 365 "grammar.y" 1602 { yyval.op = Op Equal; ;1603 break;} 1604 case 99:1618 { yyval.op = OpDivEq; ; 1619 break;} 1620 case 103: 1605 1621 #line 366 "grammar.y" 1606 { yyval.op = Op PlusEq; ;1607 break;} 1608 case 10 0:1622 { yyval.op = OpLShift; ; 1623 break;} 1624 case 104: 1609 1625 #line 367 "grammar.y" 1610 { yyval.op = Op MinusEq; ;1611 break;} 1612 case 10 1:1626 { yyval.op = OpRShift; ; 1627 break;} 1628 case 105: 1613 1629 #line 368 "grammar.y" 1614 { yyval.op = Op MultEq; ;1615 break;} 1616 case 10 2:1630 { yyval.op = OpURShift; ; 1631 break;} 1632 case 106: 1617 1633 #line 369 "grammar.y" 1618 { yyval.op = Op DivEq; ;1619 break;} 1620 case 10 3:1634 { yyval.op = OpAndEq; ; 1635 break;} 1636 case 107: 1621 1637 #line 370 "grammar.y" 1622 { yyval.op = Op LShift; ;1623 break;} 1624 case 10 4:1638 { yyval.op = OpXOrEq; ; 1639 break;} 1640 case 108: 1625 1641 #line 371 "grammar.y" 1626 { yyval.op = Op RShift; ;1627 break;} 1628 case 10 5:1642 { yyval.op = OpOrEq; ; 1643 break;} 1644 case 109: 1629 1645 #line 372 "grammar.y" 1630 { yyval.op = OpURShift; ;1631 break;}1632 case 106:1633 #line 373 "grammar.y"1634 { yyval.op = OpAndEq; ;1635 break;}1636 case 107:1637 #line 374 "grammar.y"1638 { yyval.op = OpXOrEq; ;1639 break;}1640 case 108:1641 #line 375 "grammar.y"1642 { yyval.op = OpOrEq; ;1643 break;}1644 case 109:1645 #line 376 "grammar.y"1646 1646 { yyval.op = OpModEq; ; 1647 1647 break;} 1648 1648 case 111: 1649 #line 3 81"grammar.y"1649 #line 377 "grammar.y" 1650 1650 { yyval.node = new CommaNode(yyvsp[-2].node, yyvsp[0].node); ; 1651 1651 break;} 1652 1652 case 126: 1653 #line 402"grammar.y"1653 #line 398 "grammar.y" 1654 1654 { yyval.stat = new BlockNode(0L); DBG(yyval.stat, yylsp[0], yylsp[0]); ; 1655 1655 break;} 1656 1656 case 127: 1657 #line 399 "grammar.y" 1658 { yyval.stat = new BlockNode(yyvsp[-1].srcs); DBG(yyval.stat, yylsp[0], yylsp[0]); ; 1659 break;} 1660 case 128: 1657 1661 #line 403 "grammar.y" 1658 { yyval.stat = new BlockNode(yyvsp[-1].srcs); DBG(yyval.stat, yylsp[0], yylsp[0]); ;1659 break;}1660 case 128:1661 #line 407 "grammar.y"1662 1662 { yyval.slist = new StatListNode(yyvsp[0].stat); ; 1663 1663 break;} 1664 1664 case 129: 1665 #line 404 "grammar.y" 1666 { yyval.slist = new StatListNode(yyvsp[-1].slist, yyvsp[0].stat); ; 1667 break;} 1668 case 130: 1665 1669 #line 408 "grammar.y" 1666 { yyval.slist = new StatListNode(yyvsp[-1].slist, yyvsp[0].stat); ;1667 break;}1668 case 130:1669 #line 412 "grammar.y"1670 1670 { yyval.stat = new VarStatementNode(yyvsp[-1].vlist); 1671 1671 DBG(yyval.stat, yylsp[-2], yylsp[0]); ; 1672 1672 break;} 1673 1673 case 131: 1674 #line 41 4"grammar.y"1674 #line 410 "grammar.y" 1675 1675 { if (automatic()) { 1676 1676 yyval.stat = new VarStatementNode(yyvsp[-1].vlist); … … 1682 1682 break;} 1683 1683 case 132: 1684 #line 42 4"grammar.y"1684 #line 420 "grammar.y" 1685 1685 { yyval.vlist = new VarDeclListNode(yyvsp[0].decl); ; 1686 1686 break;} 1687 1687 case 133: 1688 #line 422 "grammar.y" 1689 { yyval.vlist = new VarDeclListNode(yyvsp[-2].vlist, yyvsp[0].decl); ; 1690 break;} 1691 case 134: 1688 1692 #line 426 "grammar.y" 1689 { yyval.vlist = new VarDeclListNode(yyvsp[-2].vlist, yyvsp[0].decl); ;1690 break;}1691 case 134:1692 #line 430 "grammar.y"1693 1693 { yyval.decl = new VarDeclNode(*yyvsp[0].ident, 0); delete yyvsp[0].ident; ; 1694 1694 break;} 1695 1695 case 135: 1696 #line 427 "grammar.y" 1697 { yyval.decl = new VarDeclNode(*yyvsp[-1].ident, yyvsp[0].init); delete yyvsp[-1].ident; ; 1698 break;} 1699 case 136: 1696 1700 #line 431 "grammar.y" 1697 { yyval. decl = new VarDeclNode(*yyvsp[-1].ident, yyvsp[0].init); delete yyvsp[-1].ident; ;1698 break;} 1699 case 13 6:1701 { yyval.init = new AssignExprNode(yyvsp[0].node); ; 1702 break;} 1703 case 137: 1700 1704 #line 435 "grammar.y" 1701 { yyval. init = new AssignExprNode(yyvsp[0].node); ;1702 break;} 1703 case 13 7:1705 { yyval.stat = new EmptyStatementNode(); ; 1706 break;} 1707 case 138: 1704 1708 #line 439 "grammar.y" 1705 { yyval.stat = new EmptyStatementNode(); ;1706 break;}1707 case 138:1708 #line 443 "grammar.y"1709 1709 { yyval.stat = new ExprStatementNode(yyvsp[-1].node); 1710 1710 DBG(yyval.stat, yylsp[-1], yylsp[0]); ; 1711 1711 break;} 1712 1712 case 139: 1713 #line 44 5"grammar.y"1713 #line 441 "grammar.y" 1714 1714 { if (automatic()) { 1715 1715 yyval.stat = new ExprStatementNode(yyvsp[-1].node); … … 1719 1719 break;} 1720 1720 case 140: 1721 #line 4 53"grammar.y"1721 #line 449 "grammar.y" 1722 1722 { yyval.stat = new IfNode(yyvsp[-2].node,yyvsp[0].stat,0L);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ; 1723 1723 break;} 1724 1724 case 141: 1725 #line 451 "grammar.y" 1726 { yyval.stat = new IfNode(yyvsp[-4].node,yyvsp[-2].stat,yyvsp[0].stat);DBG(yyval.stat,yylsp[-6],yylsp[-3]); ; 1727 break;} 1728 case 142: 1725 1729 #line 455 "grammar.y" 1726 { yyval.stat = new IfNode(yyvsp[-4].node,yyvsp[-2].stat,yyvsp[0].stat);DBG(yyval.stat,yylsp[-6],yylsp[-3]); ;1727 break;}1728 case 142:1729 #line 459 "grammar.y"1730 1730 { yyval.stat=new DoWhileNode(yyvsp[-4].stat,yyvsp[-1].node);DBG(yyval.stat,yylsp[-5],yylsp[-3]);; 1731 1731 break;} 1732 1732 case 143: 1733 #line 4 60"grammar.y"1733 #line 456 "grammar.y" 1734 1734 { yyval.stat = new WhileNode(yyvsp[-2].node,yyvsp[0].stat);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ; 1735 1735 break;} 1736 1736 case 144: 1737 #line 4 62"grammar.y"1737 #line 458 "grammar.y" 1738 1738 { yyval.stat = new ForNode(yyvsp[-6].node,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat); 1739 1739 DBG(yyval.stat,yylsp[-8],yylsp[-1]); ; 1740 1740 break;} 1741 1741 case 145: 1742 #line 46 5"grammar.y"1742 #line 461 "grammar.y" 1743 1743 { yyval.stat = new ForNode(yyvsp[-6].vlist,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat); 1744 1744 DBG(yyval.stat,yylsp[-9],yylsp[-1]); ; 1745 1745 break;} 1746 1746 case 146: 1747 #line 46 8"grammar.y"1747 #line 464 "grammar.y" 1748 1748 { yyval.stat = new ForInNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].stat); 1749 1749 DBG(yyval.stat,yylsp[-6],yylsp[-1]); ; 1750 1750 break;} 1751 1751 case 147: 1752 #line 4 71"grammar.y"1752 #line 467 "grammar.y" 1753 1753 { yyval.stat = new ForInNode(*yyvsp[-4].ident,0L,yyvsp[-2].node,yyvsp[0].stat); 1754 1754 DBG(yyval.stat,yylsp[-7],yylsp[-1]); … … 1756 1756 break;} 1757 1757 case 148: 1758 #line 47 5"grammar.y"1758 #line 471 "grammar.y" 1759 1759 { yyval.stat = new ForInNode(*yyvsp[-5].ident,yyvsp[-4].init,yyvsp[-2].node,yyvsp[0].stat); 1760 1760 DBG(yyval.stat,yylsp[-8],yylsp[-1]); … … 1762 1762 break;} 1763 1763 case 149: 1764 #line 4 81"grammar.y"1764 #line 477 "grammar.y" 1765 1765 { yyval.node = 0L; ; 1766 1766 break;} 1767 1767 case 151: 1768 #line 48 6"grammar.y"1768 #line 482 "grammar.y" 1769 1769 { yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]); ; 1770 1770 break;} 1771 1771 case 152: 1772 #line 48 7"grammar.y"1772 #line 483 "grammar.y" 1773 1773 { if (automatic()) { 1774 1774 yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]); … … 1777 1777 break;} 1778 1778 case 153: 1779 #line 4 91"grammar.y"1779 #line 487 "grammar.y" 1780 1780 { yyval.stat = new ContinueNode(*yyvsp[-1].ident); DBG(yyval.stat,yylsp[-2],yylsp[0]); 1781 1781 delete yyvsp[-1].ident; ; 1782 1782 break;} 1783 1783 case 154: 1784 #line 4 93"grammar.y"1784 #line 489 "grammar.y" 1785 1785 { if (automatic()) { 1786 1786 yyval.stat = new ContinueNode(*yyvsp[-1].ident);DBG(yyval.stat,yylsp[-2],yylsp[-1]); … … 1790 1790 break;} 1791 1791 case 155: 1792 #line 501"grammar.y"1792 #line 497 "grammar.y" 1793 1793 { yyval.stat = new BreakNode();DBG(yyval.stat,yylsp[-1],yylsp[0]); ; 1794 1794 break;} 1795 1795 case 156: 1796 #line 502"grammar.y"1796 #line 498 "grammar.y" 1797 1797 { if (automatic()) { 1798 1798 yyval.stat = new BreakNode(); DBG(yyval.stat,yylsp[-1],yylsp[-1]); … … 1801 1801 break;} 1802 1802 case 157: 1803 #line 50 6"grammar.y"1803 #line 502 "grammar.y" 1804 1804 { yyval.stat = new BreakNode(*yyvsp[-1].ident); DBG(yyval.stat,yylsp[-2],yylsp[0]); 1805 1805 delete yyvsp[-1].ident; ; 1806 1806 break;} 1807 1807 case 158: 1808 #line 50 8"grammar.y"1808 #line 504 "grammar.y" 1809 1809 { if (automatic()) { 1810 1810 yyval.stat = new BreakNode(*yyvsp[-1].ident); DBG(yyval.stat,yylsp[-2],yylsp[-1]); … … 1815 1815 break;} 1816 1816 case 159: 1817 #line 51 7"grammar.y"1817 #line 513 "grammar.y" 1818 1818 { yyval.stat = new ReturnNode(0L); DBG(yyval.stat,yylsp[-1],yylsp[0]); ; 1819 1819 break;} 1820 1820 case 160: 1821 #line 51 8"grammar.y"1821 #line 514 "grammar.y" 1822 1822 { if (automatic()) { 1823 1823 yyval.stat = new ReturnNode(0L); DBG(yyval.stat,yylsp[-1],yylsp[-1]); … … 1826 1826 break;} 1827 1827 case 161: 1828 #line 5 22"grammar.y"1828 #line 518 "grammar.y" 1829 1829 { yyval.stat = new ReturnNode(yyvsp[-1].node); ; 1830 1830 break;} 1831 1831 case 162: 1832 #line 5 23"grammar.y"1832 #line 519 "grammar.y" 1833 1833 { if (automatic()) 1834 1834 yyval.stat = new ReturnNode(yyvsp[-1].node); … … 1837 1837 break;} 1838 1838 case 163: 1839 #line 5 30"grammar.y"1839 #line 526 "grammar.y" 1840 1840 { yyval.stat = new WithNode(yyvsp[-2].node,yyvsp[0].stat); 1841 1841 DBG(yyval.stat, yylsp[-4], yylsp[-1]); ; 1842 1842 break;} 1843 1843 case 164: 1844 #line 53 5"grammar.y"1844 #line 531 "grammar.y" 1845 1845 { yyval.stat = new SwitchNode(yyvsp[-2].node, yyvsp[0].cblk); 1846 1846 DBG(yyval.stat, yylsp[-4], yylsp[-1]); ; 1847 1847 break;} 1848 1848 case 165: 1849 #line 5 40"grammar.y"1849 #line 536 "grammar.y" 1850 1850 { yyval.cblk = new CaseBlockNode(yyvsp[-1].clist, 0L, 0L); ; 1851 1851 break;} 1852 1852 case 166: 1853 #line 538 "grammar.y" 1854 { yyval.cblk = new CaseBlockNode(yyvsp[-3].clist, yyvsp[-2].ccl, yyvsp[-1].clist); ; 1855 break;} 1856 case 167: 1853 1857 #line 542 "grammar.y" 1854 { yyval.cblk = new CaseBlockNode(yyvsp[-3].clist, yyvsp[-2].ccl, yyvsp[-1].clist); ;1855 break;}1856 case 167:1857 #line 546 "grammar.y"1858 1858 { yyval.clist = 0L; ; 1859 1859 break;} 1860 1860 case 169: 1861 #line 5 51"grammar.y"1861 #line 547 "grammar.y" 1862 1862 { yyval.clist = new ClauseListNode(yyvsp[0].ccl); ; 1863 1863 break;} 1864 1864 case 170: 1865 #line 548 "grammar.y" 1866 { yyval.clist = yyvsp[-1].clist->append(yyvsp[0].ccl); ; 1867 break;} 1868 case 171: 1865 1869 #line 552 "grammar.y" 1866 { yyval.clist = yyvsp[-1].clist->append(yyvsp[0].ccl); ;1867 break;}1868 case 171:1869 #line 556 "grammar.y"1870 1870 { yyval.ccl = new CaseClauseNode(yyvsp[-1].node, 0L); ; 1871 1871 break;} 1872 1872 case 172: 1873 #line 553 "grammar.y" 1874 { yyval.ccl = new CaseClauseNode(yyvsp[-2].node, yyvsp[0].slist); ; 1875 break;} 1876 case 173: 1873 1877 #line 557 "grammar.y" 1874 { yyval.ccl = new CaseClauseNode(yyvsp[-2].node, yyvsp[0].slist); ;1875 break;}1876 case 173:1877 #line 561 "grammar.y"1878 1878 { yyval.ccl = new CaseClauseNode(0L, 0L);; ; 1879 1879 break;} 1880 1880 case 174: 1881 #line 558 "grammar.y" 1882 { yyval.ccl = new CaseClauseNode(0L, yyvsp[0].slist); ; 1883 break;} 1884 case 175: 1881 1885 #line 562 "grammar.y" 1882 { yyval.ccl = new CaseClauseNode(0L, yyvsp[0].slist); ;1883 break;}1884 case 175:1885 #line 566 "grammar.y"1886 1886 { yyvsp[0].stat->pushLabel(*yyvsp[-2].ident); 1887 1887 yyval.stat = new LabelNode(*yyvsp[-2].ident, yyvsp[0].stat); … … 1889 1889 break;} 1890 1890 case 176: 1891 #line 568 "grammar.y" 1892 { yyval.stat = new ThrowNode(yyvsp[-1].node); ; 1893 break;} 1894 case 177: 1891 1895 #line 572 "grammar.y" 1892 { yyval.stat = new ThrowNode(yyvsp[-1].node); ;1893 break;}1894 case 177:1895 #line 576 "grammar.y"1896 1896 { yyval.stat = new TryNode(yyvsp[-1].stat, yyvsp[0].node); ; 1897 1897 break;} 1898 1898 case 178: 1899 #line 57 7"grammar.y"1899 #line 573 "grammar.y" 1900 1900 { yyval.stat = new TryNode(yyvsp[-1].stat, 0L, yyvsp[0].node); ; 1901 1901 break;} 1902 1902 case 179: 1903 #line 574 "grammar.y" 1904 { yyval.stat = new TryNode(yyvsp[-2].stat, yyvsp[-1].node, yyvsp[0].node); ; 1905 break;} 1906 case 180: 1903 1907 #line 578 "grammar.y" 1904 { yyval. stat = new TryNode(yyvsp[-2].stat, yyvsp[-1].node, yyvsp[0].node); ;1905 break;} 1906 case 18 0:1908 { yyval.node = new CatchNode(*yyvsp[-2].ident, yyvsp[0].stat); delete yyvsp[-2].ident; ; 1909 break;} 1910 case 181: 1907 1911 #line 582 "grammar.y" 1908 { yyval.node = new CatchNode(*yyvsp[-2].ident, yyvsp[0].stat); delete yyvsp[-2].ident; ;1909 break;} 1910 case 18 1:1912 { yyval.node = new FinallyNode(yyvsp[0].stat); ; 1913 break;} 1914 case 182: 1911 1915 #line 586 "grammar.y" 1912 { yyval.node = new FinallyNode(yyvsp[0].stat); ;1913 break;}1914 case 182:1915 #line 590 "grammar.y"1916 1916 { yyval.func = new FuncDeclNode(*yyvsp[-3].ident, 0L, yyvsp[0].body); 1917 1917 delete yyvsp[-3].ident; ; 1918 1918 break;} 1919 1919 case 183: 1920 #line 5 93"grammar.y"1920 #line 589 "grammar.y" 1921 1921 { yyval.func = new FuncDeclNode(*yyvsp[-4].ident, yyvsp[-2].param, yyvsp[0].body); 1922 1922 delete yyvsp[-4].ident; ; 1923 1923 break;} 1924 1924 case 184: 1925 #line 59 7"grammar.y"1925 #line 593 "grammar.y" 1926 1926 { yyval.node = new FuncExprNode(0L, yyvsp[0].body); ; 1927 1927 break;} 1928 1928 case 185: 1929 #line 59 9"grammar.y"1929 #line 595 "grammar.y" 1930 1930 { yyval.node = new FuncExprNode(yyvsp[-2].param, yyvsp[0].body); ; 1931 1931 break;} 1932 1932 case 186: 1933 #line 60 4"grammar.y"1933 #line 600 "grammar.y" 1934 1934 { yyval.param = new ParameterNode(*yyvsp[0].ident); delete yyvsp[0].ident; ; 1935 1935 break;} 1936 1936 case 187: 1937 #line 60 5"grammar.y"1937 #line 601 "grammar.y" 1938 1938 { yyval.param = yyvsp[-2].param->append(*yyvsp[0].ident); 1939 1939 delete yyvsp[0].ident; ; 1940 1940 break;} 1941 1941 case 188: 1942 #line 6 10"grammar.y"1942 #line 606 "grammar.y" 1943 1943 { yyval.body = new FunctionBodyNode(0L); 1944 1944 DBG(yyval.body, yylsp[-1], yylsp[0]);; 1945 1945 break;} 1946 1946 case 189: 1947 #line 6 12"grammar.y"1947 #line 608 "grammar.y" 1948 1948 { yyval.body = new FunctionBodyNode(yyvsp[-1].srcs); 1949 1949 DBG(yyval.body, yylsp[-2], yylsp[0]);; 1950 1950 break;} 1951 1951 case 190: 1952 #line 61 7"grammar.y"1952 #line 613 "grammar.y" 1953 1953 { yyval.prog = new ProgramNode(0L); 1954 1954 Parser::progNode = yyval.prog; ; 1955 1955 break;} 1956 1956 case 191: 1957 #line 61 9"grammar.y"1957 #line 615 "grammar.y" 1958 1958 { yyval.prog = new ProgramNode(yyvsp[0].srcs); 1959 1959 Parser::progNode = yyval.prog; ; 1960 1960 break;} 1961 1961 case 192: 1962 #line 62 4"grammar.y"1962 #line 620 "grammar.y" 1963 1963 { yyval.srcs = new SourceElementsNode(yyvsp[0].src); ; 1964 1964 break;} 1965 1965 case 193: 1966 #line 62 6"grammar.y"1966 #line 622 "grammar.y" 1967 1967 { yyval.srcs = new SourceElementsNode(yyvsp[0].srcs, yyvsp[-1].src); ; 1968 1968 break;} 1969 1969 case 194: 1970 #line 6 33"grammar.y"1970 #line 629 "grammar.y" 1971 1971 { yyval.src = new SourceElementNode(yyvsp[0].stat); ; 1972 1972 break;} 1973 1973 case 195: 1974 #line 63 4"grammar.y"1974 #line 630 "grammar.y" 1975 1975 { yyval.src = new SourceElementNode(yyvsp[0].func); ; 1976 1976 break;} … … 2198 2198 return 1; 2199 2199 } 2200 #line 63 7"grammar.y"2200 #line 633 "grammar.y" 2201 2201 2202 2202 -
trunk/JavaScriptCore/kjs/grammar.y
r2760 r2847 246 246 ArgumentList: 247 247 AssignmentExpr { $$ = new ArgumentListNode($1); } 248 /* #ifdef APPLE_CHANGES (not using an actual ifdef because this is yacc) */ 249 | AssignmentExpr ',' ArgumentList { $$ = new ArgumentListNode($3, $1); } 250 /* #else */ 251 /* | ArgumentList ',' AssignmentExpr { $$ = new ArgumentListNode($1, $3); } */ 252 /* #endif */ 248 | ArgumentList ',' AssignmentExpr { $$ = new ArgumentListNode($1, $3); } 253 249 ; 254 250 -
trunk/JavaScriptCore/kjs/nodes.cpp
r2824 r2847 616 616 ArgumentsNode::ArgumentsNode(ArgumentListNode *l) : list(l) 617 617 { 618 if (list == NULL) { 619 return; 620 } 621 622 ArgumentListNode *prev = list; 623 ArgumentListNode *cur = prev->list; 624 625 while (cur != NULL) { 626 prev->list = cur->list; 627 cur->list = list; 628 list = cur; 629 cur = prev->list; 630 } 618 631 } 619 632 -
trunk/JavaScriptCore/kjs/nodes.h
r2760 r2847 315 315 virtual void streamTo(SourceStream &s) const; 316 316 private: 317 friend class ArgumentsNode; 317 318 ArgumentListNode *list; 318 319 Node *expr;
Note:
See TracChangeset
for help on using the changeset viewer.