| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
#ifndef TCJSDRV_H |
| 14 |
#define TCJSDRV_H |
| 15 |
|
| 16 |
#include "tcjsint.h" |
| 17 |
#include "tcpndrv.h" |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
class CTPNSelf: public CTPNSelfBase |
| 24 |
{ |
| 25 |
public: |
| 26 |
|
| 27 |
void gen_code(int discard, int for_condition); |
| 28 |
|
| 29 |
|
| 30 |
void gen_code_member(int discard, |
| 31 |
class CTcPrsNode *prop_expr, int prop_is_expr, |
| 32 |
int argc, int varargs); |
| 33 |
|
| 34 |
|
| 35 |
vm_obj_id_t gen_code_obj_predot(int *is_self); |
| 36 |
}; |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
class CTPNReplaced: public CTPNReplacedBase |
| 43 |
{ |
| 44 |
public: |
| 45 |
|
| 46 |
void gen_code(int discard, int for_condition); |
| 47 |
|
| 48 |
|
| 49 |
void gen_code_call(int discard, int argc, int varargs); |
| 50 |
}; |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
class CTPNTargetprop: public CTPNTargetpropBase |
| 57 |
{ |
| 58 |
public: |
| 59 |
|
| 60 |
void gen_code(int discard, int for_condition); |
| 61 |
}; |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
class CTPNTargetobj: public CTPNTargetobjBase |
| 69 |
{ |
| 70 |
public: |
| 71 |
|
| 72 |
void gen_code(int discard, int for_condition); |
| 73 |
}; |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
class CTPNDefiningobj: public CTPNDefiningobjBase |
| 80 |
{ |
| 81 |
public: |
| 82 |
|
| 83 |
void gen_code(int discard, int for_condition); |
| 84 |
}; |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
class CTPNInh: public CTPNInhBase |
| 92 |
{ |
| 93 |
public: |
| 94 |
|
| 95 |
void gen_code(int discard, int for_condition); |
| 96 |
|
| 97 |
|
| 98 |
void gen_code_member(int discard, |
| 99 |
class CTcPrsNode *prop_expr, int prop_is_expr, |
| 100 |
int argc, int varargs); |
| 101 |
}; |
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
class CTPNInhClass: public CTPNInhClassBase |
| 107 |
{ |
| 108 |
public: |
| 109 |
CTPNInhClass(const char *sym, size_t len) |
| 110 |
: CTPNInhClassBase(sym, len) { } |
| 111 |
|
| 112 |
|
| 113 |
void gen_code(int discard, int for_condition); |
| 114 |
|
| 115 |
|
| 116 |
void gen_code_member(int discard, |
| 117 |
class CTcPrsNode *prop_expr, int prop_is_expr, |
| 118 |
int argc, int varargs); |
| 119 |
}; |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
class CTPNDelegated: public CTPNDelegatedBase |
| 125 |
{ |
| 126 |
public: |
| 127 |
CTPNDelegated(CTcPrsNode *delegatee) |
| 128 |
: CTPNDelegatedBase(delegatee) { } |
| 129 |
|
| 130 |
|
| 131 |
void gen_code(int discard, int for_condition); |
| 132 |
|
| 133 |
|
| 134 |
void gen_code_member(int discard, |
| 135 |
class CTcPrsNode *prop_expr, int prop_is_expr, |
| 136 |
int argc, int varargs); |
| 137 |
}; |
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
class CTPNArgc: public CTPNArgcBase |
| 145 |
{ |
| 146 |
public: |
| 147 |
void gen_code(int discard, int for_condition); |
| 148 |
}; |
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
class CTPNConst: public CTPNConstBase |
| 156 |
{ |
| 157 |
public: |
| 158 |
CTPNConst(CTcConstVal *val) : CTPNConstBase(val) { } |
| 159 |
|
| 160 |
|
| 161 |
void gen_code(int discard, int for_condition); |
| 162 |
|
| 163 |
|
| 164 |
void gen_code_new(int discard, int argc, int varargs, int from_call, |
| 165 |
int is_transient); |
| 166 |
|
| 167 |
|
| 168 |
vm_prop_id_t gen_code_propid(int check_only, int is_expr); |
| 169 |
|
| 170 |
|
| 171 |
void gen_code_member(int discard, |
| 172 |
class CTcPrsNode *prop_expr, int prop_is_expr, |
| 173 |
int argc, int varargs); |
| 174 |
|
| 175 |
|
| 176 |
void gen_code_call(int discard, int argc, int varargs); |
| 177 |
|
| 178 |
|
| 179 |
vm_obj_id_t gen_code_obj_predot(int *is_self); |
| 180 |
|
| 181 |
|
| 182 |
static void s_gen_code_int(class js_expr_buf &expr, long intval); |
| 183 |
|
| 184 |
|
| 185 |
void gen_code(class js_expr_buf &expr); |
| 186 |
}; |
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
class CTPNDebugConst: public CTPNConst |
| 192 |
{ |
| 193 |
public: |
| 194 |
CTPNDebugConst(CTcConstVal *val) : CTPNConst(val) { } |
| 195 |
|
| 196 |
|
| 197 |
void gen_code(int discard, int for_condition); |
| 198 |
}; |
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
CTPNUnary_def(CTPNBNot); |
| 207 |
|
| 208 |
|
| 209 |
CTPNUnary_def(CTPNPos); |
| 210 |
|
| 211 |
|
| 212 |
CTPNUnary_def(CTPNNeg); |
| 213 |
|
| 214 |
|
| 215 |
CTPNUnary_side_def(CTPNPreInc); |
| 216 |
|
| 217 |
|
| 218 |
CTPNUnary_side_def(CTPNPreDec); |
| 219 |
|
| 220 |
|
| 221 |
CTPNUnary_side_def(CTPNPostInc); |
| 222 |
|
| 223 |
|
| 224 |
CTPNUnary_side_def(CTPNPostDec); |
| 225 |
|
| 226 |
|
| 227 |
CTPNUnary_side_def(CTPNDelete); |
| 228 |
|
| 229 |
|
| 230 |
CTPNUnary_def(CTPNBoolize); |
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
class CTPNNew: public CTPNUnary |
| 237 |
{ |
| 238 |
public: |
| 239 |
CTPNNew(class CTcPrsNode *sub, int is_transient) |
| 240 |
: CTPNUnary(sub) |
| 241 |
{ |
| 242 |
|
| 243 |
transient_ = is_transient; |
| 244 |
} |
| 245 |
|
| 246 |
|
| 247 |
void gen_code(int discard, int for_condition); |
| 248 |
|
| 249 |
|
| 250 |
virtual int has_side_effects() const { return TRUE; } |
| 251 |
|
| 252 |
protected: |
| 253 |
|
| 254 |
int transient_; |
| 255 |
}; |
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
class CTPNNot: public CTPNNotBase |
| 263 |
{ |
| 264 |
public: |
| 265 |
CTPNNot(CTcPrsNode *sub) : CTPNNotBase(sub) { } |
| 266 |
|
| 267 |
|
| 268 |
void gen_code(int discard, int for_condition); |
| 269 |
}; |
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
class CTPNComma: public CTPNCommaBase |
| 278 |
{ |
| 279 |
public: |
| 280 |
CTPNComma(class CTcPrsNode *lhs, CTcPrsNode *rhs) |
| 281 |
: CTPNCommaBase(lhs, rhs) { } |
| 282 |
|
| 283 |
|
| 284 |
void gen_code(int discard, int for_condition); |
| 285 |
}; |
| 286 |
|
| 287 |
|
| 288 |
CTPNBin_def(CTPNBOr); |
| 289 |
|
| 290 |
|
| 291 |
CTPNBin_def(CTPNBAnd); |
| 292 |
|
| 293 |
|
| 294 |
CTPNBin_def(CTPNBXor); |
| 295 |
|
| 296 |
|
| 297 |
CTPNBin_def(CTPNGt); |
| 298 |
|
| 299 |
|
| 300 |
CTPNBin_def(CTPNGe); |
| 301 |
|
| 302 |
|
| 303 |
CTPNBin_def(CTPNLt); |
| 304 |
|
| 305 |
|
| 306 |
CTPNBin_def(CTPNLe); |
| 307 |
|
| 308 |
|
| 309 |
CTPNBin_def(CTPNShl); |
| 310 |
|
| 311 |
|
| 312 |
CTPNBin_def(CTPNShr); |
| 313 |
|
| 314 |
|
| 315 |
CTPNBin_def(CTPNMul); |
| 316 |
|
| 317 |
|
| 318 |
CTPNBin_def(CTPNDiv); |
| 319 |
|
| 320 |
|
| 321 |
CTPNBin_def(CTPNMod); |
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
class CTPNAdd: public CTPNAddBase |
| 329 |
{ |
| 330 |
public: |
| 331 |
CTPNAdd(class CTcPrsNode *left, class CTcPrsNode *right) |
| 332 |
: CTPNAddBase(left, right) { } |
| 333 |
|
| 334 |
|
| 335 |
void gen_code(int discard, int for_condition); |
| 336 |
}; |
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
class CTPNSub: public CTPNSubBase |
| 345 |
{ |
| 346 |
public: |
| 347 |
CTPNSub(class CTcPrsNode *left, class CTcPrsNode *right) |
| 348 |
: CTPNSubBase(left, right) { } |
| 349 |
|
| 350 |
|
| 351 |
void gen_code(int discard, int for_condition); |
| 352 |
}; |
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
class CTPNEq: public CTPNEqBase |
| 360 |
{ |
| 361 |
public: |
| 362 |
CTPNEq(class CTcPrsNode *left, class CTcPrsNode *right) |
| 363 |
: CTPNEqBase(left, right) { } |
| 364 |
|
| 365 |
|
| 366 |
void gen_code(int discard, int for_condition); |
| 367 |
}; |
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
class CTPNNe: public CTPNNeBase |
| 376 |
{ |
| 377 |
public: |
| 378 |
CTPNNe(class CTcPrsNode *left, class CTcPrsNode *right) |
| 379 |
: CTPNNeBase(left, right) { } |
| 380 |
|
| 381 |
|
| 382 |
void gen_code(int discard, int for_condition); |
| 383 |
}; |
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
class CTPNIsIn: public CTPNIsInBase |
| 391 |
{ |
| 392 |
public: |
| 393 |
CTPNIsIn(class CTcPrsNode *left, class CTPNArglist *right) |
| 394 |
: CTPNIsInBase(left, right) { } |
| 395 |
|
| 396 |
|
| 397 |
void gen_code(int discard, int for_condition); |
| 398 |
}; |
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
|
| 405 |
|
| 406 |
class CTPNNotIn: public CTPNNotInBase |
| 407 |
{ |
| 408 |
public: |
| 409 |
CTPNNotIn(class CTcPrsNode *left, class CTPNArglist *right) |
| 410 |
: CTPNNotInBase(left, right) { } |
| 411 |
|
| 412 |
|
| 413 |
void gen_code(int discard, int for_condition); |
| 414 |
}; |
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
class CTPNAnd: public CTPNAndBase |
| 423 |
{ |
| 424 |
public: |
| 425 |
CTPNAnd(class CTcPrsNode *left, class CTcPrsNode *right) |
| 426 |
: CTPNAndBase(left, right) { } |
| 427 |
|
| 428 |
|
| 429 |
void gen_code(int discard, int for_condition); |
| 430 |
}; |
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
class CTPNOr: public CTPNOrBase |
| 439 |
{ |
| 440 |
public: |
| 441 |
CTPNOr(class CTcPrsNode *left, class CTcPrsNode *right) |
| 442 |
: CTPNOrBase(left, right) { } |
| 443 |
|
| 444 |
|
| 445 |
void gen_code(int discard, int for_condition); |
| 446 |
}; |
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
class CTPNAsi: public CTPNAsiBase |
| 456 |
{ |
| 457 |
public: |
| 458 |
CTPNAsi(class CTcPrsNode *left, class CTcPrsNode *right) |
| 459 |
: CTPNAsiBase(left, right) { } |
| 460 |
|
| 461 |
|
| 462 |
void gen_code(int discard, int for_condition); |
| 463 |
}; |
| 464 |
|
| 465 |
|
| 466 |
CTPNBin_side_def(CTPNAddAsi); |
| 467 |
|
| 468 |
|
| 469 |
CTPNBin_side_def(CTPNSubAsi); |
| 470 |
|
| 471 |
|
| 472 |
CTPNBin_side_def(CTPNMulAsi); |
| 473 |
|
| 474 |
|
| 475 |
CTPNBin_side_def(CTPNDivAsi); |
| 476 |
|
| 477 |
|
| 478 |
CTPNBin_side_def(CTPNModAsi); |
| 479 |
|
| 480 |
|
| 481 |
CTPNBin_side_def(CTPNBAndAsi); |
| 482 |
|
| 483 |
|
| 484 |
CTPNBin_side_def(CTPNBOrAsi); |
| 485 |
|
| 486 |
|
| 487 |
CTPNBin_side_def(CTPNBXorAsi); |
| 488 |
|
| 489 |
|
| 490 |
CTPNBin_side_def(CTPNShlAsi); |
| 491 |
|
| 492 |
|
| 493 |
CTPNBin_side_def(CTPNShrAsi); |
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
class CTPNSubscript: public CTPNSubscriptBase |
| 500 |
{ |
| 501 |
public: |
| 502 |
CTPNSubscript(CTcPrsNode *lhs, CTcPrsNode *rhs) |
| 503 |
: CTPNSubscriptBase(lhs, rhs) { } |
| 504 |
|
| 505 |
|
| 506 |
void gen_code(int discard, int for_condition); |
| 507 |
|
| 508 |
|
| 509 |
int gen_code_asi(int discard, tc_asitype_t typ, CTcPrsNode *rhs, |
| 510 |
int ignore_errors); |
| 511 |
}; |
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
class CTPNAddr: public CTPNAddrBase |
| 520 |
{ |
| 521 |
public: |
| 522 |
CTPNAddr(CTcPrsNode *sub) |
| 523 |
: CTPNAddrBase(sub) { } |
| 524 |
|
| 525 |
|
| 526 |
void gen_code(int discard, int for_condition) |
| 527 |
{ |
| 528 |
|
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
if (!discard) |
| 534 |
sub_->gen_code_addr(); |
| 535 |
} |
| 536 |
|
| 537 |
|
| 538 |
void gen_code_member(int discard, |
| 539 |
class CTcPrsNode *prop_expr, int prop_is_expr, |
| 540 |
int argc, int varargs) |
| 541 |
{ |
| 542 |
|
| 543 |
|
| 544 |
|
| 545 |
|
| 546 |
sub_->gen_code_member(discard, prop_expr, prop_is_expr, |
| 547 |
argc, varargs); |
| 548 |
} |
| 549 |
|
| 550 |
|
| 551 |
vm_prop_id_t gen_code_propid(int check_only, int is_expr) |
| 552 |
{ |
| 553 |
|
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
return sub_->gen_code_propid(check_only, is_expr); |
| 558 |
} |
| 559 |
|
| 560 |
|
| 561 |
vm_obj_id_t gen_code_obj_predot(int *is_self) |
| 562 |
{ |
| 563 |
|
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
return sub_->gen_code_obj_predot(is_self); |
| 568 |
} |
| 569 |
}; |
| 570 |
|
| 571 |
|
| 572 |
|
| 573 |
|
| 574 |
|
| 575 |
class CTPNIf: public CTPNIfBase |
| 576 |
{ |
| 577 |
public: |
| 578 |
CTPNIf(class CTcPrsNode *first, class CTcPrsNode *second, |
| 579 |
class CTcPrsNode *third) |
| 580 |
: CTPNIfBase(first, second, third) { } |
| 581 |
|
| 582 |
|
| 583 |
void gen_code(int discard, int for_condition); |
| 584 |
}; |
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
|
| 589 |
|
| 590 |
class CTPNSym: public CTPNSymBase |
| 591 |
{ |
| 592 |
public: |
| 593 |
CTPNSym(const char *sym, size_t len) |
| 594 |
: CTPNSymBase(sym, len) { } |
| 595 |
|
| 596 |
|
| 597 |
void gen_code(int discard, int for_condition); |
| 598 |
|
| 599 |
|
| 600 |
int gen_code_asi(int discard, tc_asitype_t typ, CTcPrsNode *rhs, |
| 601 |
int ignore_errors); |
| 602 |
|
| 603 |
|
| 604 |
void gen_code_addr(); |
| 605 |
|
| 606 |
|
| 607 |
void gen_code_call(int discard, int argc, int varargs); |
| 608 |
|
| 609 |
|
| 610 |
void gen_code_new(int discard, int argc, int varargs, int from_call, |
| 611 |
int is_transient); |
| 612 |
|
| 613 |
|
| 614 |
vm_prop_id_t gen_code_propid(int check_only, int is_expr); |
| 615 |
|
| 616 |
|
| 617 |
void gen_code_member(int discard, |
| 618 |
class CTcPrsNode *prop_expr, int prop_is_expr, |
| 619 |
int argc, int varargs); |
| 620 |
|
| 621 |
|
| 622 |
vm_obj_id_t gen_code_obj_predot(int *is_self); |
| 623 |
}; |
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
class CTPNSymResolved: public CTPNSymResolvedBase |
| 630 |
{ |
| 631 |
public: |
| 632 |
CTPNSymResolved(CTcSymbol *sym) |
| 633 |
: CTPNSymResolvedBase(sym) { } |
| 634 |
|
| 635 |
|
| 636 |
void gen_code(int discard, int for_condition); |
| 637 |
|
| 638 |
|
| 639 |
int gen_code_asi(int discard, tc_asitype_t typ, CTcPrsNode *rhs, |
| 640 |
int ignore_errors); |
| 641 |
|
| 642 |
|
| 643 |
void gen_code_addr(); |
| 644 |
|
| 645 |
|
| 646 |
void gen_code_call(int discard, int argc, int varargs); |
| 647 |
|
| 648 |
|
| 649 |
void gen_code_new(int discard, int argc, int varargs, int from_call, |
| 650 |
int is_transient); |
| 651 |
|
| 652 |
|
| 653 |
vm_prop_id_t gen_code_propid(int check_only, int is_expr); |
| 654 |
|
| 655 |
|
| 656 |
void gen_code_member(int discard, |
| 657 |
class CTcPrsNode *prop_expr, int prop_is_expr, |
| 658 |
int argc, int varargs); |
| 659 |
|
| 660 |
|
| 661 |
vm_obj_id_t gen_code_obj_predot(int *is_self); |
| 662 |
}; |
| 663 |
|
| 664 |
|
| 665 |
|
| 666 |
|
| 667 |
|
| 668 |
class CTPNSymDebugLocal: public CTPNSymDebugLocalBase |
| 669 |
{ |
| 670 |
public: |
| 671 |
CTPNSymDebugLocal(const struct tcprsdbg_sym_info *info) |
| 672 |
: CTPNSymDebugLocalBase(info) |
| 673 |
{ |
| 674 |
} |
| 675 |
|
| 676 |
|
| 677 |
void gen_code(int discard, int for_condition); |
| 678 |
|
| 679 |
|
| 680 |
int gen_code_asi(int discard, tc_asitype_t typ, |
| 681 |
class CTcPrsNode *rhs, int ignore_errors); |
| 682 |
}; |
| 683 |
|
| 684 |
|
| 685 |
|
| 686 |
|
| 687 |
|
| 688 |
class CTPNDstr: public CTPNDstrBase |
| 689 |
{ |
| 690 |
public: |
| 691 |
CTPNDstr(const char *str, size_t len) |
| 692 |
: CTPNDstrBase(str, len) { } |
| 693 |
|
| 694 |
void gen_code(int discard, int for_condition); |
| 695 |
}; |
| 696 |
|
| 697 |
|
| 698 |
|
| 699 |
|
| 700 |
class CTPNDebugDstr: public CTPNDstr |
| 701 |
{ |
| 702 |
public: |
| 703 |
CTPNDebugDstr(const char *str, size_t len) |
| 704 |
: CTPNDstr(str, len) { } |
| 705 |
|
| 706 |
void gen_code(int discard, int for_condition); |
| 707 |
}; |
| 708 |
|
| 709 |
|
| 710 |
|
| 711 |
|
| 712 |
class CTPNDstrEmbed: public CTPNDstrEmbedBase |
| 713 |
{ |
| 714 |
public: |
| 715 |
CTPNDstrEmbed(CTcPrsNode *sub); |
| 716 |
|
| 717 |
void gen_code(int discard, int for_condition); |
| 718 |
}; |
| 719 |
|
| 720 |
|
| 721 |
|
| 722 |
|
| 723 |
|
| 724 |
class CTPNArglist: public CTPNArglistBase |
| 725 |
{ |
| 726 |
public: |
| 727 |
CTPNArglist(int argc, class CTPNArg *list_head) |
| 728 |
: CTPNArglistBase(argc, list_head) { } |
| 729 |
|
| 730 |
void gen_code(int, int) |
| 731 |
{ |
| 732 |
|
| 733 |
|
| 734 |
|
| 735 |
|
| 736 |
assert(FALSE); |
| 737 |
} |
| 738 |
|
| 739 |
|
| 740 |
void gen_code_arglist(int *varargs); |
| 741 |
}; |
| 742 |
|
| 743 |
|
| 744 |
|
| 745 |
|
| 746 |
class CTPNArg: public CTPNArgBase |
| 747 |
{ |
| 748 |
public: |
| 749 |
CTPNArg(CTcPrsNode *expr) |
| 750 |
: CTPNArgBase(expr) { } |
| 751 |
|
| 752 |
void gen_code(int discard, int for_condition); |
| 753 |
}; |
| 754 |
|
| 755 |
|
| 756 |
|
| 757 |
|
| 758 |
|
| 759 |
class CTPNCall: public CTPNCallBase |
| 760 |
{ |
| 761 |
public: |
| 762 |
CTPNCall(CTcPrsNode *func, class CTPNArglist *arglist); |
| 763 |
|
| 764 |
|
| 765 |
void gen_code(int discard, int for_condition); |
| 766 |
|
| 767 |
|
| 768 |
void gen_code_new(int discard, int argc, int varargs, int from_call, |
| 769 |
int is_transient); |
| 770 |
}; |
| 771 |
|
| 772 |
|
| 773 |
|
| 774 |
|
| 775 |
|
| 776 |
|
| 777 |
class CTPNMember: public CTPNMemberBase |
| 778 |
{ |
| 779 |
public: |
| 780 |
CTPNMember(CTcPrsNode *lhs, CTcPrsNode *rhs, int rhs_is_expr) |
| 781 |
: CTPNMemberBase(lhs, rhs, rhs_is_expr) { } |
| 782 |
|
| 783 |
|
| 784 |
void gen_code(int discard, int for_condition); |
| 785 |
|
| 786 |
|
| 787 |
int gen_code_asi(int discard, tc_asitype_t typ, CTcPrsNode *rhs, |
| 788 |
int ignore_errors); |
| 789 |
}; |
| 790 |
|
| 791 |
|
| 792 |
|
| 793 |
|
| 794 |
class CTPNMemArg: public CTPNMemArgBase |
| 795 |
{ |
| 796 |
public: |
| 797 |
CTPNMemArg(CTcPrsNode *obj_expr, CTcPrsNode *prop_expr, int prop_is_expr, |
| 798 |
class CTPNArglist *arglist) |
| 799 |
: CTPNMemArgBase(obj_expr, prop_expr, prop_is_expr, arglist) { } |
| 800 |
|
| 801 |
void gen_code(int discard, int for_condition); |
| 802 |
}; |
| 803 |
|
| 804 |
|
| 805 |
|
| 806 |
|
| 807 |
|
| 808 |
|
| 809 |
class CTPNList: public CTPNListBase |
| 810 |
{ |
| 811 |
public: |
| 812 |
void gen_code(int discard, int for_condition); |
| 813 |
}; |
| 814 |
|
| 815 |
|
| 816 |
|
| 817 |
|
| 818 |
class CTPNListEle: public CTPNListEleBase |
| 819 |
{ |
| 820 |
public: |
| 821 |
CTPNListEle(CTcPrsNode *expr) |
| 822 |
: CTPNListEleBase(expr) { } |
| 823 |
|
| 824 |
void gen_code(int discard, int for_condition); |
| 825 |
}; |
| 826 |
|
| 827 |
|
| 828 |
|
| 829 |
|
| 830 |
|
| 831 |
|
| 832 |
|
| 833 |
|
| 834 |
|
| 835 |
class CTcSymUndef: public CTcSymUndefBase |
| 836 |
{ |
| 837 |
public: |
| 838 |
CTcSymUndef(const char *str, size_t len, int copy) |
| 839 |
: CTcSymUndefBase(str, len, copy) { } |
| 840 |
|
| 841 |
|
| 842 |
|
| 843 |
|
| 844 |
|
| 845 |
virtual void gen_code(int) { } |
| 846 |
|
| 847 |
|
| 848 |
|
| 849 |
|
| 850 |
|
| 851 |
|
| 852 |
|
| 853 |
virtual int gen_code_asi(int, tc_asitype_t, class CTcPrsNode *, int) |
| 854 |
{ |
| 855 |
return TRUE; |
| 856 |
} |
| 857 |
|
| 858 |
|
| 859 |
|
| 860 |
|
| 861 |
|
| 862 |
virtual void gen_code_addr() { } |
| 863 |
|
| 864 |
|
| 865 |
|
| 866 |
|
| 867 |
|
| 868 |
|
| 869 |
virtual void gen_code_call(int, int, int) { } |
| 870 |
|
| 871 |
|
| 872 |
|
| 873 |
|
| 874 |
|
| 875 |
void gen_code_new(int, int, int, int) { } |
| 876 |
|
| 877 |
|
| 878 |
void gen_code_member(int, class CTcPrsNode *, int, int, int) { } |
| 879 |
|
| 880 |
|
| 881 |
vm_obj_id_t gen_code_obj_predot(int *is_self) |
| 882 |
{ |
| 883 |
*is_self = FALSE; |
| 884 |
return VM_INVALID_OBJ; |
| 885 |
} |
| 886 |
}; |
| 887 |
|
| 888 |
|
| 889 |
|
| 890 |
|
| 891 |
|
| 892 |
class CTcSymFunc: public CTcSymFuncBase |
| 893 |
{ |
| 894 |
public: |
| 895 |
CTcSymFunc(const char *str, size_t len, int copy, |
| 896 |
int argc, int varargs, int has_retval, |
| 897 |
int is_multimethod, int is_mm_base, int is_extern) |
| 898 |
: CTcSymFuncBase(str, len, copy, argc, varargs, has_retval, |
| 899 |
is_multimethod, is_mm_base, is_extern) |
| 900 |
{ |
| 901 |
|
| 902 |
|
| 903 |
|
| 904 |
|
| 905 |
abs_addr_valid_ = FALSE; |
| 906 |
abs_addr_ = 0; |
| 907 |
} |
| 908 |
|
| 909 |
|
| 910 |
virtual void gen_code(int discard); |
| 911 |
|
| 912 |
|
| 913 |
virtual void gen_code_addr(); |
| 914 |
|
| 915 |
|
| 916 |
virtual void gen_code_call(int discard, int argc, int varargs); |
| 917 |
|
| 918 |
|
| 919 |
|
| 920 |
|
| 921 |
|
| 922 |
|
| 923 |
|
| 924 |
|
| 925 |
|
| 926 |
|
| 927 |
|
| 928 |
ulong get_code_pool_addr() const; |
| 929 |
|
| 930 |
|
| 931 |
int write_to_image_file_global(class CVmImageWriter *image_writer); |
| 932 |
|
| 933 |
|
| 934 |
|
| 935 |
|
| 936 |
|
| 937 |
|
| 938 |
|
| 939 |
|
| 940 |
void set_abs_addr(ulong addr) |
| 941 |
{ |
| 942 |
|
| 943 |
abs_addr_ = addr; |
| 944 |
|
| 945 |
|
| 946 |
abs_addr_valid_ = TRUE; |
| 947 |
} |
| 948 |
|
| 949 |
|
| 950 |
void add_runtime_symbol(class CVmRuntimeSymbols *symtab); |
| 951 |
|
| 952 |
protected: |
| 953 |
|
| 954 |
|
| 955 |
|
| 956 |
|
| 957 |
|
| 958 |
|
| 959 |
|
| 960 |
|
| 961 |
|
| 962 |
ulong abs_addr_; |
| 963 |
uint abs_addr_valid_ : 1; |
| 964 |
}; |
| 965 |
|
| 966 |
|
| 967 |
|
| 968 |
|
| 969 |
class CTcSymMetaclass: public CTcSymMetaclassBase |
| 970 |
{ |
| 971 |
public: |
| 972 |
CTcSymMetaclass(const char *str, size_t len, int copy, int meta_idx, |
| 973 |
tctarg_obj_id_t class_obj) |
| 974 |
: CTcSymMetaclassBase(str, len, copy, meta_idx, class_obj) |
| 975 |
{ |
| 976 |
} |
| 977 |
|
| 978 |
|
| 979 |
virtual void gen_code(int discard); |
| 980 |
|
| 981 |
|
| 982 |
void gen_code_new(int discard, int argc, int varargs, int is_transient); |
| 983 |
|
| 984 |
|
| 985 |
void gen_code_member(int discard, |
| 986 |
class CTcPrsNode *prop_expr, int prop_is_expr, |
| 987 |
int argc, int varargs); |
| 988 |
|
| 989 |
|
| 990 |
vm_obj_id_t gen_code_obj_predot(int *is_self) |
| 991 |
{ |
| 992 |
|
| 993 |
gen_code(FALSE); |
| 994 |
|
| 995 |
|
| 996 |
*is_self = FALSE; |
| 997 |
return VM_INVALID_OBJ; |
| 998 |
} |
| 999 |
|
| 1000 |
|
| 1001 |
int write_to_image_file_global(class CVmImageWriter *image_writer); |
| 1002 |
|
| 1003 |
|
| 1004 |
|
| 1005 |
|
| 1006 |
|
| 1007 |
|
| 1008 |
void fix_mod_obj_sc_list(); |
| 1009 |
|
| 1010 |
|
| 1011 |
void add_runtime_symbol(class CVmRuntimeSymbols *symtab); |
| 1012 |
}; |
| 1013 |
|
| 1014 |
|
| 1015 |
|
| 1016 |
|
| 1017 |
class CTcSymObj: public CTcSymObjBase |
| 1018 |
{ |
| 1019 |
public: |
| 1020 |
CTcSymObj(const char *str, size_t len, int copy, vm_obj_id_t obj_id, |
| 1021 |
int is_extern, tc_metaclass_t meta, class CTcDictEntry *dict) |
| 1022 |
: CTcSymObjBase(str, len, copy, obj_id, is_extern, meta, dict) |
| 1023 |
{ |
| 1024 |
} |
| 1025 |
|
| 1026 |
|
| 1027 |
virtual vm_obj_id_t get_val_obj() const { return get_obj_id(); } |
| 1028 |
|
| 1029 |
|
| 1030 |
virtual void gen_code(int discard); |
| 1031 |
|
| 1032 |
|
| 1033 |
virtual void gen_code_addr(); |
| 1034 |
|
| 1035 |
|
| 1036 |
void gen_code_new(int discard, int argc, int varargs, int is_transient); |
| 1037 |
|
| 1038 |
|
| 1039 |
static void s_gen_code_new(int discard, vm_obj_id_t obj_id, |
| 1040 |
tc_metaclass_t meta, |
| 1041 |
int argc, int varargs, int is_transient); |
| 1042 |
|
| 1043 |
|
| 1044 |
void gen_code_member(int discard, |
| 1045 |
class CTcPrsNode *prop_expr, int prop_is_expr, |
| 1046 |
int argc, int varargs); |
| 1047 |
|
| 1048 |
|
| 1049 |
static void s_gen_code_member(int discard, |
| 1050 |
class CTcPrsNode *prop_expr, |
| 1051 |
int prop_is_expr, int argc, |
| 1052 |
vm_obj_id_t obj_id, int varargs); |
| 1053 |
|
| 1054 |
|
| 1055 |
vm_obj_id_t gen_code_obj_predot(int *is_self); |
| 1056 |
|
| 1057 |
|
| 1058 |
virtual void delete_prop_from_mod_base(tctarg_prop_id_t prop_id); |
| 1059 |
|
| 1060 |
|
| 1061 |
virtual void mark_compiled_as_class(); |
| 1062 |
|
| 1063 |
|
| 1064 |
int write_to_image_file_global(class CVmImageWriter *image_writer); |
| 1065 |
|
| 1066 |
|
| 1067 |
virtual void build_dictionary(); |
| 1068 |
|
| 1069 |
|
| 1070 |
void add_runtime_symbol(class CVmRuntimeSymbols *symtab); |
| 1071 |
}; |
| 1072 |
|
| 1073 |
|
| 1074 |
|
| 1075 |
|
| 1076 |
class CTcSymProp: public CTcSymPropBase |
| 1077 |
{ |
| 1078 |
public: |
| 1079 |
CTcSymProp(const char *str, size_t len, int copy, tctarg_prop_id_t prop) |
| 1080 |
: CTcSymPropBase(str, len, copy, prop) { } |
| 1081 |
|
| 1082 |
|
| 1083 |
virtual void gen_code(int discard); |
| 1084 |
|
| 1085 |
|
| 1086 |
virtual void gen_code_addr(); |
| 1087 |
|
| 1088 |
|
| 1089 |
virtual int gen_code_asi(int discard, tc_asitype_t typ, |
| 1090 |
class CTcPrsNode *rhs, int ignore_errors); |
| 1091 |
|
| 1092 |
|
| 1093 |
virtual void gen_code_call(int discard, int argc, int varargs); |
| 1094 |
|
| 1095 |
|
| 1096 |
vm_prop_id_t gen_code_propid(int check_only, int is_expr); |
| 1097 |
|
| 1098 |
|
| 1099 |
void gen_code_member(int discard, |
| 1100 |
class CTcPrsNode *prop_expr, int prop_is_expr, |
| 1101 |
int argc, int varargs); |
| 1102 |
|
| 1103 |
|
| 1104 |
vm_obj_id_t gen_code_obj_predot(int *is_self) |
| 1105 |
{ |
| 1106 |
|
| 1107 |
gen_code(FALSE); |
| 1108 |
|
| 1109 |
|
| 1110 |
*is_self = FALSE; |
| 1111 |
return VM_INVALID_OBJ; |
| 1112 |
} |
| 1113 |
|
| 1114 |
|
| 1115 |
int write_to_image_file_global(class CVmImageWriter *image_writer); |
| 1116 |
|
| 1117 |
|
| 1118 |
void add_runtime_symbol(class CVmRuntimeSymbols *symtab); |
| 1119 |
}; |
| 1120 |
|
| 1121 |
|
| 1122 |
|
| 1123 |
|
| 1124 |
class CTcSymEnum: public CTcSymEnumBase |
| 1125 |
{ |
| 1126 |
public: |
| 1127 |
CTcSymEnum(const char *str, size_t len, int copy, ulong id, int is_token) |
| 1128 |
: CTcSymEnumBase(str, len, copy, id, is_token) |
| 1129 |
{ |
| 1130 |
} |
| 1131 |
|
| 1132 |
|
| 1133 |
virtual void gen_code(int discard); |
| 1134 |
|
| 1135 |
|
| 1136 |
int write_to_image_file_global(class CVmImageWriter *image_writer); |
| 1137 |
|
| 1138 |
|
| 1139 |
void add_runtime_symbol(class CVmRuntimeSymbols *symtab); |
| 1140 |
}; |
| 1141 |
|
| 1142 |
|
| 1143 |
|
| 1144 |
|
| 1145 |
class CTcSymLocal: public CTcSymLocalBase |
| 1146 |
{ |
| 1147 |
public: |
| 1148 |
CTcSymLocal(const char *str, size_t len, int copy, |
| 1149 |
int is_param, int var_num) |
| 1150 |
: CTcSymLocalBase(str, len, copy, is_param, var_num) { } |
| 1151 |
|
| 1152 |
|
| 1153 |
virtual void gen_code(int discard); |
| 1154 |
|
| 1155 |
|
| 1156 |
void gen_code_setlcl_stk() { s_gen_code_setlcl_stk(var_num_, is_param_); } |
| 1157 |
|
| 1158 |
|
| 1159 |
static void s_gen_code_getlcl(int local_id, int is_param); |
| 1160 |
|
| 1161 |
|
| 1162 |
static void s_gen_code_setlcl_stk(int local_id, int is_param); |
| 1163 |
|
| 1164 |
|
| 1165 |
void gen_code_setlcl(); |
| 1166 |
|
| 1167 |
|
| 1168 |
virtual int gen_code_asi(int discard, tc_asitype_t typ, |
| 1169 |
class CTcPrsNode *rhs, int ignore_errors); |
| 1170 |
|
| 1171 |
|
| 1172 |
|
| 1173 |
|
| 1174 |
|
| 1175 |
virtual void gen_code_call(int discard, int argc, int varargs); |
| 1176 |
|
| 1177 |
|
| 1178 |
vm_prop_id_t gen_code_propid(int check_only, int is_expr); |
| 1179 |
|
| 1180 |
|
| 1181 |
void gen_code_member(int discard, |
| 1182 |
class CTcPrsNode *prop_expr, int prop_is_expr, |
| 1183 |
int argc, int varargs); |
| 1184 |
|
| 1185 |
|
| 1186 |
vm_obj_id_t gen_code_obj_predot(int *is_self) |
| 1187 |
{ |
| 1188 |
|
| 1189 |
gen_code(FALSE); |
| 1190 |
|
| 1191 |
|
| 1192 |
*is_self = FALSE; |
| 1193 |
return VM_INVALID_OBJ; |
| 1194 |
} |
| 1195 |
|
| 1196 |
|
| 1197 |
virtual int write_to_debug_frame(); |
| 1198 |
}; |
| 1199 |
|
| 1200 |
|
| 1201 |
|
| 1202 |
|
| 1203 |
class CTcSymBif: public CTcSymBifBase |
| 1204 |
{ |
| 1205 |
public: |
| 1206 |
CTcSymBif(const char *str, size_t len, int copy, |
| 1207 |
int func_set_id, int func_idx, int has_retval, |
| 1208 |
int min_argc, int max_argc, int varargs) |
| 1209 |
: CTcSymBifBase(str, len, copy, func_set_id, func_idx, |
| 1210 |
has_retval, min_argc, max_argc, varargs) { } |
| 1211 |
|
| 1212 |
|
| 1213 |
virtual void gen_code(int discard); |
| 1214 |
|
| 1215 |
|
| 1216 |
virtual void gen_code_call(int discard, int argc, int varargs); |
| 1217 |
|
| 1218 |
|
| 1219 |
int write_to_image_file_global(class CVmImageWriter *image_writer); |
| 1220 |
}; |
| 1221 |
|
| 1222 |
|
| 1223 |
|
| 1224 |
|
| 1225 |
class CTcSymExtfn: public CTcSymExtfnBase |
| 1226 |
{ |
| 1227 |
public: |
| 1228 |
CTcSymExtfn(const char *str, size_t len, int copy, |
| 1229 |
int argc, int varargs, int has_retval) |
| 1230 |
: CTcSymExtfnBase(str, len, copy, argc, varargs, has_retval) { } |
| 1231 |
|
| 1232 |
|
| 1233 |
virtual void gen_code(int discard); |
| 1234 |
|
| 1235 |
|
| 1236 |
virtual void gen_code_call(int discard, int argc, int varargs); |
| 1237 |
|
| 1238 |
|
| 1239 |
int write_to_image_file_global(class CVmImageWriter *image_writer); |
| 1240 |
}; |
| 1241 |
|
| 1242 |
|
| 1243 |
|
| 1244 |
|
| 1245 |
class CTcSymLabel: public CTcSymLabelBase |
| 1246 |
{ |
| 1247 |
public: |
| 1248 |
CTcSymLabel(const char *str, size_t len, int copy) |
| 1249 |
: CTcSymLabelBase(str, len, copy) { } |
| 1250 |
|
| 1251 |
|
| 1252 |
virtual void gen_code(int discard); |
| 1253 |
}; |
| 1254 |
|
| 1255 |
|
| 1256 |
|
| 1257 |
|
| 1258 |
|
| 1259 |
class CTPNAnonFunc: public CTPNAnonFuncBase |
| 1260 |
{ |
| 1261 |
public: |
| 1262 |
CTPNAnonFunc(class CTPNCodeBody *code_body, int has_retval) |
| 1263 |
: CTPNAnonFuncBase(code_body, has_retval) |
| 1264 |
{ |
| 1265 |
} |
| 1266 |
|
| 1267 |
|
| 1268 |
virtual void gen_code(int discard, int for_condition); |
| 1269 |
}; |
| 1270 |
|
| 1271 |
|
| 1272 |
|
| 1273 |
|
| 1274 |
|
| 1275 |
class CTPNCodeBody: public CTPNCodeBodyBase |
| 1276 |
{ |
| 1277 |
public: |
| 1278 |
CTPNCodeBody(class CTcPrsSymtab *lcltab, class CTcPrsSymtab *gototab, |
| 1279 |
class CTPNStm *stm, int argc, int varargs, |
| 1280 |
int varargs_list, class CTcSymLocal *varargs_list_local, |
| 1281 |
int local_cnt, int self_valid, |
| 1282 |
struct CTcCodeBodyRef *enclosing_code_body) |
| 1283 |
: CTPNCodeBodyBase(lcltab, gototab, stm, argc, varargs, |
| 1284 |
varargs_list, varargs_list_local, |
| 1285 |
local_cnt, self_valid, enclosing_code_body) |
| 1286 |
{ |
| 1287 |
|
| 1288 |
is_constructor_ = FALSE; |
| 1289 |
|
| 1290 |
|
| 1291 |
allocated_fin_ret_lcl_ = FALSE; |
| 1292 |
fin_ret_lcl_ = 0; |
| 1293 |
|
| 1294 |
|
| 1295 |
is_static_ = FALSE; |
| 1296 |
|
| 1297 |
|
| 1298 |
first_nested_symtab_ = 0; |
| 1299 |
} |
| 1300 |
|
| 1301 |
|
| 1302 |
|
| 1303 |
|
| 1304 |
|
| 1305 |
void set_constructor(int f) { is_constructor_ = f; } |
| 1306 |
|
| 1307 |
|
| 1308 |
|
| 1309 |
|
| 1310 |
|
| 1311 |
void set_static() { is_static_ = TRUE; } |
| 1312 |
|
| 1313 |
|
| 1314 |
virtual void gen_code(int discard, int for_condition); |
| 1315 |
|
| 1316 |
|
| 1317 |
virtual void check_locals(); |
| 1318 |
|
| 1319 |
|
| 1320 |
|
| 1321 |
|
| 1322 |
|
| 1323 |
|
| 1324 |
|
| 1325 |
|
| 1326 |
|
| 1327 |
uint alloc_fin_ret_lcl() |
| 1328 |
{ |
| 1329 |
|
| 1330 |
if (!allocated_fin_ret_lcl_) |
| 1331 |
{ |
| 1332 |
|
| 1333 |
fin_ret_lcl_ = local_cnt_++; |
| 1334 |
|
| 1335 |
|
| 1336 |
allocated_fin_ret_lcl_ = TRUE; |
| 1337 |
} |
| 1338 |
|
| 1339 |
|
| 1340 |
return fin_ret_lcl_; |
| 1341 |
} |
| 1342 |
|
| 1343 |
|
| 1344 |
void js_anon_func(); |
| 1345 |
|
| 1346 |
protected: |
| 1347 |
|
| 1348 |
|
| 1349 |
|
| 1350 |
|
| 1351 |
static void write_local_to_debug_frame(void *ctx, class CTcSymbol *sym); |
| 1352 |
|
| 1353 |
|
| 1354 |
|
| 1355 |
|
| 1356 |
|
| 1357 |
static void enum_for_param_ctx(void *ctx, class CTcSymbol *sym); |
| 1358 |
|
| 1359 |
|
| 1360 |
void build_debug_table(ulong start_ofs); |
| 1361 |
|
| 1362 |
|
| 1363 |
void show_disassembly(unsigned long start_ofs, |
| 1364 |
unsigned long code_start_ofs, |
| 1365 |
unsigned long code_end_ofs); |
| 1366 |
|
| 1367 |
|
| 1368 |
class CTcPrsSymtab *first_nested_symtab_; |
| 1369 |
|
| 1370 |
|
| 1371 |
|
| 1372 |
|
| 1373 |
|
| 1374 |
|
| 1375 |
uint fin_ret_lcl_; |
| 1376 |
|
| 1377 |
|
| 1378 |
uint is_constructor_ : 1; |
| 1379 |
|
| 1380 |
|
| 1381 |
|
| 1382 |
|
| 1383 |
|
| 1384 |
uint allocated_fin_ret_lcl_ : 1; |
| 1385 |
|
| 1386 |
|
| 1387 |
uint is_static_ : 1; |
| 1388 |
}; |
| 1389 |
|
| 1390 |
|
| 1391 |
|
| 1392 |
|
| 1393 |
|
| 1394 |
class CTPNStmComp: public CTPNStmCompBase |
| 1395 |
{ |
| 1396 |
public: |
| 1397 |
CTPNStmComp(class CTPNStm *first_stm, class CTcPrsSymtab *symtab) |
| 1398 |
: CTPNStmCompBase(first_stm, symtab) { } |
| 1399 |
}; |
| 1400 |
|
| 1401 |
|
| 1402 |
|
| 1403 |
|
| 1404 |
|
| 1405 |
class CTPNStmNull: public CTPNStmNullBase |
| 1406 |
{ |
| 1407 |
public: |
| 1408 |
CTPNStmNull() { } |
| 1409 |
}; |
| 1410 |
|
| 1411 |
|
| 1412 |
|
| 1413 |
|
| 1414 |
|
| 1415 |
class CTPNStmExpr: public CTPNStmExprBase |
| 1416 |
{ |
| 1417 |
public: |
| 1418 |
CTPNStmExpr(class CTcPrsNode *expr) |
| 1419 |
: CTPNStmExprBase(expr) { } |
| 1420 |
}; |
| 1421 |
|
| 1422 |
|
| 1423 |
|
| 1424 |
|
| 1425 |
|
| 1426 |
class CTPNStmStaticPropInit: public CTPNStmStaticPropInitBase |
| 1427 |
{ |
| 1428 |
public: |
| 1429 |
CTPNStmStaticPropInit(class CTcPrsNode *expr, |
| 1430 |
tctarg_prop_id_t prop) |
| 1431 |
: CTPNStmStaticPropInitBase(expr, prop) { } |
| 1432 |
|
| 1433 |
|
| 1434 |
virtual void gen_code(int discard, int for_condition); |
| 1435 |
}; |
| 1436 |
|
| 1437 |
|
| 1438 |
|
| 1439 |
|
| 1440 |
|
| 1441 |
class CTPNStmIf: public CTPNStmIfBase |
| 1442 |
{ |
| 1443 |
public: |
| 1444 |
CTPNStmIf(class CTcPrsNode *cond_expr, |
| 1445 |
class CTPNStm *then_part, class CTPNStm *else_part) |
| 1446 |
: CTPNStmIfBase(cond_expr, then_part, else_part) { } |
| 1447 |
|
| 1448 |
|
| 1449 |
virtual void gen_code(int discard, int for_condition); |
| 1450 |
}; |
| 1451 |
|
| 1452 |
|
| 1453 |
|
| 1454 |
|
| 1455 |
|
| 1456 |
class CTPNStmFor: public CTPNStmForBase |
| 1457 |
{ |
| 1458 |
public: |
| 1459 |
CTPNStmFor(class CTcPrsNode *init_expr, |
| 1460 |
class CTcPrsNode *cond_expr, |
| 1461 |
class CTcPrsNode *reinit_expr, |
| 1462 |
class CTcPrsSymtab *symtab, |
| 1463 |
class CTPNStmEnclosing *enclosing_stm) |
| 1464 |
: CTPNStmForBase(init_expr, cond_expr, reinit_expr, |
| 1465 |
symtab, enclosing_stm) |
| 1466 |
{ |
| 1467 |
} |
| 1468 |
|
| 1469 |
|
| 1470 |
virtual void gen_code(int discard, int for_condition); |
| 1471 |
|
| 1472 |
|
| 1473 |
virtual int gen_code_break(const textchar_t *lbl, size_t lbl_len) |
| 1474 |
{ return gen_code_break_loop(break_lbl_, lbl, lbl_len); } |
| 1475 |
|
| 1476 |
|
| 1477 |
virtual int gen_code_labeled_continue() |
| 1478 |
{ return gen_code_continue_loop(cont_lbl_, 0, 0); } |
| 1479 |
|
| 1480 |
|
| 1481 |
virtual int gen_code_continue(const textchar_t *lbl, size_t lbl_len) |
| 1482 |
{ return gen_code_continue_loop(cont_lbl_, lbl, lbl_len); } |
| 1483 |
|
| 1484 |
protected: |
| 1485 |
|
| 1486 |
struct CTcCodeLabel *break_lbl_; |
| 1487 |
|
| 1488 |
|
| 1489 |
struct CTcCodeLabel *cont_lbl_; |
| 1490 |
}; |
| 1491 |
|
| 1492 |
|
| 1493 |
|
| 1494 |
|
| 1495 |
|
| 1496 |
class CTPNStmForeach: public CTPNStmForeachBase |
| 1497 |
{ |
| 1498 |
public: |
| 1499 |
CTPNStmForeach(class CTcPrsNode *iter_expr, |
| 1500 |
class CTcPrsNode *coll_expr, |
| 1501 |
class CTcPrsSymtab *symtab, |
| 1502 |
class CTPNStmEnclosing *enclosing_stm, |
| 1503 |
int iter_local_id) |
| 1504 |
: CTPNStmForeachBase(iter_expr, coll_expr, symtab, enclosing_stm, |
| 1505 |
iter_local_id) |
| 1506 |
{ |
| 1507 |
} |
| 1508 |
|
| 1509 |
|
| 1510 |
virtual void gen_code(int discard, int for_condition); |
| 1511 |
|
| 1512 |
|
| 1513 |
virtual int gen_code_break(const textchar_t *lbl, size_t lbl_len) |
| 1514 |
{ return gen_code_break_loop(break_lbl_, lbl, lbl_len); } |
| 1515 |
|
| 1516 |
|
| 1517 |
virtual int gen_code_labeled_continue() |
| 1518 |
{ return gen_code_continue_loop(cont_lbl_, 0, 0); } |
| 1519 |
|
| 1520 |
|
| 1521 |
virtual int gen_code_continue(const textchar_t *lbl, size_t lbl_len) |
| 1522 |
{ return gen_code_continue_loop(cont_lbl_, lbl, lbl_len); } |
| 1523 |
|
| 1524 |
protected: |
| 1525 |
|
| 1526 |
struct CTcCodeLabel *break_lbl_; |
| 1527 |
|
| 1528 |
|
| 1529 |
struct CTcCodeLabel *cont_lbl_; |
| 1530 |
}; |
| 1531 |
|
| 1532 |
|
| 1533 |
|
| 1534 |
|
| 1535 |
|
| 1536 |
class CTPNStmBreak: public CTPNStmBreakBase |
| 1537 |
{ |
| 1538 |
public: |
| 1539 |
CTPNStmBreak() { } |
| 1540 |
|
| 1541 |
|
| 1542 |
virtual void gen_code(int discard, int for_condition); |
| 1543 |
}; |
| 1544 |
|
| 1545 |
|
| 1546 |
|
| 1547 |
|
| 1548 |
|
| 1549 |
class CTPNStmContinue: public CTPNStmContinueBase |
| 1550 |
{ |
| 1551 |
public: |
| 1552 |
CTPNStmContinue() { } |
| 1553 |
|
| 1554 |
|
| 1555 |
virtual void gen_code(int discard, int for_condition); |
| 1556 |
}; |
| 1557 |
|
| 1558 |
|
| 1559 |
|
| 1560 |
|
| 1561 |
|
| 1562 |
class CTPNStmWhile: public CTPNStmWhileBase |
| 1563 |
{ |
| 1564 |
public: |
| 1565 |
CTPNStmWhile(class CTcPrsNode *cond_expr, |
| 1566 |
class CTPNStmEnclosing *enclosing_stm) |
| 1567 |
: CTPNStmWhileBase(cond_expr, enclosing_stm) { } |
| 1568 |
|
| 1569 |
|
| 1570 |
virtual void gen_code(int discard, int for_condition); |
| 1571 |
|
| 1572 |
|
| 1573 |
virtual int gen_code_break(const textchar_t *lbl, size_t lbl_len) |
| 1574 |
{ return gen_code_break_loop(break_lbl_, lbl, lbl_len); } |
| 1575 |
|
| 1576 |
|
| 1577 |
virtual int gen_code_labeled_continue() |
| 1578 |
{ return gen_code_continue_loop(cont_lbl_, 0, 0); } |
| 1579 |
|
| 1580 |
|
| 1581 |
virtual int gen_code_continue(const textchar_t *lbl, size_t lbl_len) |
| 1582 |
{ return gen_code_continue_loop(cont_lbl_, lbl, lbl_len); } |
| 1583 |
|
| 1584 |
protected: |
| 1585 |
|
| 1586 |
struct CTcCodeLabel *break_lbl_; |
| 1587 |
|
| 1588 |
|
| 1589 |
struct CTcCodeLabel *cont_lbl_; |
| 1590 |
}; |
| 1591 |
|
| 1592 |
|
| 1593 |
|
| 1594 |
|
| 1595 |
|
| 1596 |
class CTPNStmDoWhile: public CTPNStmDoWhileBase |
| 1597 |
{ |
| 1598 |
public: |
| 1599 |
CTPNStmDoWhile(class CTPNStmEnclosing *enclosing_stm) |
| 1600 |
: CTPNStmDoWhileBase(enclosing_stm) { } |
| 1601 |
|
| 1602 |
|
| 1603 |
virtual void gen_code(int discard, int for_condition); |
| 1604 |
|
| 1605 |
|
| 1606 |
virtual int gen_code_break(const textchar_t *lbl, size_t lbl_len) |
| 1607 |
{ return gen_code_break_loop(break_lbl_, lbl, lbl_len); } |
| 1608 |
|
| 1609 |
|
| 1610 |
virtual int gen_code_labeled_continue() |
| 1611 |
{ return gen_code_continue_loop(cont_lbl_, 0, 0); } |
| 1612 |
|
| 1613 |
|
| 1614 |
virtual int gen_code_continue(const textchar_t *lbl, size_t lbl_len) |
| 1615 |
{ return gen_code_continue_loop(cont_lbl_, lbl, lbl_len); } |
| 1616 |
|
| 1617 |
protected: |
| 1618 |
|
| 1619 |
struct CTcCodeLabel *break_lbl_; |
| 1620 |
|
| 1621 |
|
| 1622 |
struct CTcCodeLabel *cont_lbl_; |
| 1623 |
}; |
| 1624 |
|
| 1625 |
|
| 1626 |
|
| 1627 |
|
| 1628 |
|
| 1629 |
class CTPNStmReturn: public CTPNStmReturnBase |
| 1630 |
{ |
| 1631 |
public: |
| 1632 |
CTPNStmReturn(class CTcPrsNode *expr) |
| 1633 |
: CTPNStmReturnBase(expr) { } |
| 1634 |
|
| 1635 |
|
| 1636 |
virtual void gen_code(int discard, int for_condition); |
| 1637 |
}; |
| 1638 |
|
| 1639 |
|
| 1640 |
|
| 1641 |
|
| 1642 |
|
| 1643 |
class CTPNStmSwitch: public CTPNStmSwitchBase |
| 1644 |
{ |
| 1645 |
public: |
| 1646 |
CTPNStmSwitch(class CTPNStmEnclosing *enclosing_stm) |
| 1647 |
: CTPNStmSwitchBase(enclosing_stm) |
| 1648 |
{ |
| 1649 |
|
| 1650 |
case_slot_ofs_ = 0; |
| 1651 |
default_slot_ofs_ = 0; |
| 1652 |
} |
| 1653 |
|
| 1654 |
|
| 1655 |
virtual void gen_code(int discard, int for_condition); |
| 1656 |
|
| 1657 |
|
| 1658 |
|
| 1659 |
|
| 1660 |
|
| 1661 |
|
| 1662 |
|
| 1663 |
ulong alloc_case_slot() |
| 1664 |
{ |
| 1665 |
ulong ret; |
| 1666 |
|
| 1667 |
|
| 1668 |
ret = case_slot_ofs_; |
| 1669 |
|
| 1670 |
|
| 1671 |
case_slot_ofs_ += VMB_DATAHOLDER + VMB_UINT2; |
| 1672 |
|
| 1673 |
|
| 1674 |
return ret; |
| 1675 |
} |
| 1676 |
|
| 1677 |
|
| 1678 |
ulong get_default_slot() const { return default_slot_ofs_; } |
| 1679 |
|
| 1680 |
|
| 1681 |
virtual int gen_code_break(const textchar_t *lbl, size_t lbl_len) |
| 1682 |
{ |
| 1683 |
|
| 1684 |
|
| 1685 |
|
| 1686 |
|
| 1687 |
|
| 1688 |
|
| 1689 |
if (lbl == 0 && break_lbl_ == 0) |
| 1690 |
return TRUE; |
| 1691 |
|
| 1692 |
|
| 1693 |
return gen_code_break_loop(break_lbl_, lbl, lbl_len); |
| 1694 |
} |
| 1695 |
|
| 1696 |
protected: |
| 1697 |
|
| 1698 |
|
| 1699 |
|
| 1700 |
|
| 1701 |
|
| 1702 |
|
| 1703 |
ulong case_slot_ofs_; |
| 1704 |
|
| 1705 |
|
| 1706 |
ulong default_slot_ofs_; |
| 1707 |
|
| 1708 |
|
| 1709 |
struct CTcCodeLabel *break_lbl_; |
| 1710 |
}; |
| 1711 |
|
| 1712 |
|
| 1713 |
|
| 1714 |
|
| 1715 |
|
| 1716 |
|
| 1717 |
class CTPNStmLabel: public CTPNStmLabelBase |
| 1718 |
{ |
| 1719 |
public: |
| 1720 |
CTPNStmLabel(class CTcSymLabel *lbl, class CTPNStmEnclosing *enclosing); |
| 1721 |
|
| 1722 |
|
| 1723 |
virtual void gen_code(int discard, int for_condition); |
| 1724 |
|
| 1725 |
|
| 1726 |
virtual int gen_code_break(const textchar_t *lbl, size_t lbl_len); |
| 1727 |
|
| 1728 |
|
| 1729 |
virtual int gen_code_continue(const textchar_t *lbl, size_t lbl_len); |
| 1730 |
|
| 1731 |
|
| 1732 |
|
| 1733 |
|
| 1734 |
|
| 1735 |
|
| 1736 |
|
| 1737 |
|
| 1738 |
|
| 1739 |
|
| 1740 |
|
| 1741 |
|
| 1742 |
|
| 1743 |
virtual int gen_code_labeled_continue() |
| 1744 |
{ return (stm_ != 0 ? stm_->gen_code_labeled_continue() : FALSE); } |
| 1745 |
|
| 1746 |
|
| 1747 |
struct CTcCodeLabel *get_goto_label(); |
| 1748 |
|
| 1749 |
protected: |
| 1750 |
|
| 1751 |
struct CTcCodeLabel *goto_label_; |
| 1752 |
|
| 1753 |
|
| 1754 |
struct CTcCodeLabel *break_label_; |
| 1755 |
}; |
| 1756 |
|
| 1757 |
|
| 1758 |
|
| 1759 |
|
| 1760 |
|
| 1761 |
class CTPNStmCase: public CTPNStmCaseBase |
| 1762 |
{ |
| 1763 |
public: |
| 1764 |
CTPNStmCase() { } |
| 1765 |
|
| 1766 |
|
| 1767 |
virtual void gen_code(int discard, int for_condition); |
| 1768 |
}; |
| 1769 |
|
| 1770 |
|
| 1771 |
|
| 1772 |
|
| 1773 |
|
| 1774 |
class CTPNStmDefault: public CTPNStmDefaultBase |
| 1775 |
{ |
| 1776 |
public: |
| 1777 |
CTPNStmDefault() { } |
| 1778 |
|
| 1779 |
|
| 1780 |
virtual void gen_code(int discard, int for_condition); |
| 1781 |
}; |
| 1782 |
|
| 1783 |
|
| 1784 |
|
| 1785 |
|
| 1786 |
|
| 1787 |
class CTPNStmTry: public CTPNStmTryBase |
| 1788 |
{ |
| 1789 |
public: |
| 1790 |
CTPNStmTry(class CTPNStmEnclosing *enclosing) |
| 1791 |
: CTPNStmTryBase(enclosing) |
| 1792 |
{ |
| 1793 |
} |
| 1794 |
|
| 1795 |
|
| 1796 |
virtual void gen_code(int discard, int for_condition); |
| 1797 |
|
| 1798 |
|
| 1799 |
virtual int gen_code_break(const textchar_t *lbl, size_t lbl_len); |
| 1800 |
|
| 1801 |
|
| 1802 |
virtual int gen_code_continue(const textchar_t *lbl, size_t lbl_len); |
| 1803 |
|
| 1804 |
|
| 1805 |
|
| 1806 |
|
| 1807 |
|
| 1808 |
|
| 1809 |
virtual void gen_code_unwind_for_return() |
| 1810 |
{ |
| 1811 |
|
| 1812 |
gen_jsr_finally(); |
| 1813 |
|
| 1814 |
|
| 1815 |
CTPNStmTryBase::gen_code_unwind_for_return(); |
| 1816 |
} |
| 1817 |
|
| 1818 |
|
| 1819 |
virtual int will_gen_code_unwind_for_return() const |
| 1820 |
{ |
| 1821 |
|
| 1822 |
if (finally_stm_ != 0) |
| 1823 |
return TRUE; |
| 1824 |
|
| 1825 |
|
| 1826 |
return CTPNStmTryBase::will_gen_code_unwind_for_return(); |
| 1827 |
} |
| 1828 |
|
| 1829 |
|
| 1830 |
virtual void gen_code_for_transfer_out() |
| 1831 |
{ |
| 1832 |
|
| 1833 |
gen_jsr_finally(); |
| 1834 |
} |
| 1835 |
|
| 1836 |
|
| 1837 |
|
| 1838 |
|
| 1839 |
|
| 1840 |
|
| 1841 |
|
| 1842 |
|
| 1843 |
|
| 1844 |
void gen_jsr_finally(); |
| 1845 |
|
| 1846 |
|
| 1847 |
struct CTcCodeLabel *get_finally_lbl() const { return finally_lbl_; } |
| 1848 |
|
| 1849 |
protected: |
| 1850 |
|
| 1851 |
struct CTcCodeLabel *finally_lbl_; |
| 1852 |
}; |
| 1853 |
|
| 1854 |
|
| 1855 |
|
| 1856 |
|
| 1857 |
|
| 1858 |
class CTPNStmCatch: public CTPNStmCatchBase |
| 1859 |
{ |
| 1860 |
public: |
| 1861 |
CTPNStmCatch() { } |
| 1862 |
|
| 1863 |
|
| 1864 |
virtual void gen_code(int discard, int for_condition); |
| 1865 |
|
| 1866 |
|
| 1867 |
virtual void gen_code_catch(ulong protected_start_ofs, |
| 1868 |
ulong protected_end_ofs); |
| 1869 |
}; |
| 1870 |
|
| 1871 |
|
| 1872 |
|
| 1873 |
|
| 1874 |
|
| 1875 |
class CTPNStmFinally: public CTPNStmFinallyBase |
| 1876 |
{ |
| 1877 |
public: |
| 1878 |
CTPNStmFinally(CTPNStmEnclosing *enclosing, |
| 1879 |
int exc_local_id, int jsr_local_id) |
| 1880 |
: CTPNStmFinallyBase(enclosing, exc_local_id, jsr_local_id) |
| 1881 |
{ |
| 1882 |
} |
| 1883 |
|
| 1884 |
|
| 1885 |
virtual void gen_code(int discard, int for_condition); |
| 1886 |
|
| 1887 |
|
| 1888 |
virtual void gen_code_finally(ulong protected_start_ofs, |
| 1889 |
ulong protected_end_ofs, |
| 1890 |
class CTPNStmTry *try_stm); |
| 1891 |
|
| 1892 |
|
| 1893 |
virtual int check_enter_by_goto(class CTPNStmGoto *goto_stm, |
| 1894 |
class CTPNStmLabel *target); |
| 1895 |
}; |
| 1896 |
|
| 1897 |
|
| 1898 |
|
| 1899 |
|
| 1900 |
|
| 1901 |
|
| 1902 |
class CTPNStmThrow: public CTPNStmThrowBase |
| 1903 |
{ |
| 1904 |
public: |
| 1905 |
CTPNStmThrow(class CTcPrsNode *expr) |
| 1906 |
: CTPNStmThrowBase(expr) |
| 1907 |
{ |
| 1908 |
} |
| 1909 |
|
| 1910 |
|
| 1911 |
virtual void gen_code(int discard, int for_condition); |
| 1912 |
}; |
| 1913 |
|
| 1914 |
|
| 1915 |
|
| 1916 |
|
| 1917 |
|
| 1918 |
|
| 1919 |
class CTPNStmGoto: public CTPNStmGotoBase |
| 1920 |
{ |
| 1921 |
public: |
| 1922 |
CTPNStmGoto(const textchar_t *lbl, size_t lbl_len) |
| 1923 |
: CTPNStmGotoBase(lbl, lbl_len) |
| 1924 |
{ |
| 1925 |
} |
| 1926 |
|
| 1927 |
|
| 1928 |
virtual void gen_code(int discard, int for_condition); |
| 1929 |
}; |
| 1930 |
|
| 1931 |
|
| 1932 |
|
| 1933 |
|
| 1934 |
|
| 1935 |
class CTPNStmDict: public CTPNStmDictBase |
| 1936 |
{ |
| 1937 |
public: |
| 1938 |
CTPNStmDict(class CTcDictEntry *dict) |
| 1939 |
: CTPNStmDictBase(dict) |
| 1940 |
{ |
| 1941 |
} |
| 1942 |
|
| 1943 |
|
| 1944 |
virtual void gen_code(int, int) { } |
| 1945 |
}; |
| 1946 |
|
| 1947 |
|
| 1948 |
|
| 1949 |
|
| 1950 |
|
| 1951 |
class CTPNStmObject: public CTPNStmObjectBase |
| 1952 |
{ |
| 1953 |
public: |
| 1954 |
CTPNStmObject(class CTcSymObj *obj_sym, int is_class) |
| 1955 |
: CTPNStmObjectBase(obj_sym, is_class) |
| 1956 |
{ |
| 1957 |
} |
| 1958 |
|
| 1959 |
|
| 1960 |
virtual void gen_code(int discard, int for_condition); |
| 1961 |
|
| 1962 |
|
| 1963 |
virtual void check_locals(); |
| 1964 |
|
| 1965 |
|
| 1966 |
|
| 1967 |
|
| 1968 |
|
| 1969 |
|
| 1970 |
|
| 1971 |
|
| 1972 |
|
| 1973 |
|
| 1974 |
|
| 1975 |
|
| 1976 |
|
| 1977 |
|
| 1978 |
|
| 1979 |
|
| 1980 |
|
| 1981 |
|
| 1982 |
static uint get_stream_prop_cnt(class CTcDataStream *stream, |
| 1983 |
ulong obj_ofs); |
| 1984 |
static size_t set_stream_prop_cnt(class CTcDataStream *stream, |
| 1985 |
ulong obj_ofs, uint prop_cnt); |
| 1986 |
static uint get_stream_sc_cnt(class CTcDataStream *stream, |
| 1987 |
ulong obj_ofs); |
| 1988 |
static vm_obj_id_t get_stream_sc(class CTcDataStream *stream, |
| 1989 |
ulong obj_ofs, uint sc_idx); |
| 1990 |
static void set_stream_sc(class CTcDataStream *stream, |
| 1991 |
ulong obj_ofs, uint sc_idx, vm_obj_id_t new_sc); |
| 1992 |
static ulong get_stream_first_prop_ofs(class CTcDataStream *stream, |
| 1993 |
ulong obj_ofs); |
| 1994 |
static ulong get_stream_prop_ofs(class CTcDataStream *stream, |
| 1995 |
ulong obj_ofs, uint prop_idx); |
| 1996 |
static vm_prop_id_t get_stream_prop_id(class CTcDataStream *stream, |
| 1997 |
ulong obj_ofs, uint prop_idx); |
| 1998 |
static enum vm_datatype_t |
| 1999 |
get_stream_prop_type(class CTcDataStream *stream, |
| 2000 |
ulong obj_ofs, uint prop_idx); |
| 2001 |
static ulong get_stream_prop_val_ofs(class CTcDataStream *stream, |
| 2002 |
ulong obj_ofs, uint prop_idx); |
| 2003 |
static void set_stream_prop_id(class CTcDataStream *stream, |
| 2004 |
ulong obj_ofs, uint prop_idx, |
| 2005 |
vm_prop_id_t new_id); |
| 2006 |
static uint get_stream_obj_flags(class CTcDataStream *stream, |
| 2007 |
ulong obj_ofs); |
| 2008 |
static void set_stream_obj_flags(class CTcDataStream *stream, |
| 2009 |
ulong obj_ofs, uint flags); |
| 2010 |
}; |
| 2011 |
|
| 2012 |
|
| 2013 |
|
| 2014 |
|
| 2015 |
class CTPNObjProp: public CTPNObjPropBase |
| 2016 |
{ |
| 2017 |
public: |
| 2018 |
CTPNObjProp(class CTPNStmObject *obj_stm, class CTcSymProp *prop_sym, |
| 2019 |
class CTcPrsNode *expr, class CTPNCodeBody *code_body, |
| 2020 |
int is_static) |
| 2021 |
: CTPNObjPropBase(obj_stm, prop_sym, expr, code_body, is_static) |
| 2022 |
{ |
| 2023 |
} |
| 2024 |
|
| 2025 |
|
| 2026 |
virtual void gen_code(int discard, int for_condition); |
| 2027 |
|
| 2028 |
|
| 2029 |
void check_locals(); |
| 2030 |
}; |
| 2031 |
|
| 2032 |
|
| 2033 |
|
| 2034 |
|
| 2035 |
class CTPNStmImplicitCtor: public CTPNStmImplicitCtorBase |
| 2036 |
{ |
| 2037 |
public: |
| 2038 |
CTPNStmImplicitCtor(class CTPNStmObject *obj_stm) |
| 2039 |
: CTPNStmImplicitCtorBase(obj_stm) |
| 2040 |
{ |
| 2041 |
} |
| 2042 |
|
| 2043 |
|
| 2044 |
virtual void gen_code(int discard, int for_condition); |
| 2045 |
}; |
| 2046 |
|
| 2047 |
|
| 2048 |
#endif |