Mercurial > projects > ldc
comparison dmd/declaration.h @ 1148:3d1b16dabd25
Eliminated the need for resolve, declare, const-init and define lists to drive code generation.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Fri, 27 Mar 2009 21:50:32 +0100 |
parents | dbe4af57b240 |
children | e961851fb8be |
comparison
equal
deleted
inserted
replaced
1147:dbe4af57b240 | 1148:3d1b16dabd25 |
---|---|
286 // Eliminate need for dynamic_cast | 286 // Eliminate need for dynamic_cast |
287 VarDeclaration *isVarDeclaration() { return (VarDeclaration *)this; } | 287 VarDeclaration *isVarDeclaration() { return (VarDeclaration *)this; } |
288 | 288 |
289 #if IN_LLVM | 289 #if IN_LLVM |
290 /// Codegen traversal | 290 /// Codegen traversal |
291 void codegen(Ir* ir); | 291 virtual void codegen(Ir* ir); |
292 | 292 |
293 // LDC | 293 // LDC |
294 AnonDeclaration* anonDecl; | 294 AnonDeclaration* anonDecl; |
295 unsigned offset2; | 295 unsigned offset2; |
296 bool nakedUse; | 296 bool nakedUse; |
366 virtual TypeInfoDeclaration* isTypeInfoDeclaration() { return this; } | 366 virtual TypeInfoDeclaration* isTypeInfoDeclaration() { return this; } |
367 | 367 |
368 #if IN_LLVM | 368 #if IN_LLVM |
369 /// Codegen traversal | 369 /// Codegen traversal |
370 void codegen(Ir* ir); | 370 void codegen(Ir* ir); |
371 virtual void llvmDeclare(); | |
372 virtual void llvmDefine(); | 371 virtual void llvmDefine(); |
373 #endif | 372 #endif |
374 }; | 373 }; |
375 | 374 |
376 struct TypeInfoStructDeclaration : TypeInfoDeclaration | 375 struct TypeInfoStructDeclaration : TypeInfoDeclaration |
380 #if IN_DMD | 379 #if IN_DMD |
381 void toDt(dt_t **pdt); | 380 void toDt(dt_t **pdt); |
382 #endif | 381 #endif |
383 | 382 |
384 #if IN_LLVM | 383 #if IN_LLVM |
385 void llvmDeclare(); | |
386 void llvmDefine(); | 384 void llvmDefine(); |
387 #endif | 385 #endif |
388 }; | 386 }; |
389 | 387 |
390 struct TypeInfoClassDeclaration : TypeInfoDeclaration | 388 struct TypeInfoClassDeclaration : TypeInfoDeclaration |
394 #if IN_DMD | 392 #if IN_DMD |
395 void toDt(dt_t **pdt); | 393 void toDt(dt_t **pdt); |
396 #endif | 394 #endif |
397 | 395 |
398 #if IN_LLVM | 396 #if IN_LLVM |
399 void llvmDeclare(); | |
400 void llvmDefine(); | 397 void llvmDefine(); |
401 #endif | 398 #endif |
402 }; | 399 }; |
403 | 400 |
404 struct TypeInfoInterfaceDeclaration : TypeInfoDeclaration | 401 struct TypeInfoInterfaceDeclaration : TypeInfoDeclaration |
408 #if IN_DMD | 405 #if IN_DMD |
409 void toDt(dt_t **pdt); | 406 void toDt(dt_t **pdt); |
410 #endif | 407 #endif |
411 | 408 |
412 #if IN_LLVM | 409 #if IN_LLVM |
413 void llvmDeclare(); | |
414 void llvmDefine(); | 410 void llvmDefine(); |
415 #endif | 411 #endif |
416 }; | 412 }; |
417 | 413 |
418 struct TypeInfoTypedefDeclaration : TypeInfoDeclaration | 414 struct TypeInfoTypedefDeclaration : TypeInfoDeclaration |
422 #if IN_DMD | 418 #if IN_DMD |
423 void toDt(dt_t **pdt); | 419 void toDt(dt_t **pdt); |
424 #endif | 420 #endif |
425 | 421 |
426 #if IN_LLVM | 422 #if IN_LLVM |
427 void llvmDeclare(); | |
428 void llvmDefine(); | 423 void llvmDefine(); |
429 #endif | 424 #endif |
430 }; | 425 }; |
431 | 426 |
432 struct TypeInfoPointerDeclaration : TypeInfoDeclaration | 427 struct TypeInfoPointerDeclaration : TypeInfoDeclaration |
436 #if IN_DMD | 431 #if IN_DMD |
437 void toDt(dt_t **pdt); | 432 void toDt(dt_t **pdt); |
438 #endif | 433 #endif |
439 | 434 |
440 #if IN_LLVM | 435 #if IN_LLVM |
441 void llvmDeclare(); | |
442 void llvmDefine(); | 436 void llvmDefine(); |
443 #endif | 437 #endif |
444 }; | 438 }; |
445 | 439 |
446 struct TypeInfoArrayDeclaration : TypeInfoDeclaration | 440 struct TypeInfoArrayDeclaration : TypeInfoDeclaration |
450 #if IN_DMD | 444 #if IN_DMD |
451 void toDt(dt_t **pdt); | 445 void toDt(dt_t **pdt); |
452 #endif | 446 #endif |
453 | 447 |
454 #if IN_LLVM | 448 #if IN_LLVM |
455 void llvmDeclare(); | |
456 void llvmDefine(); | 449 void llvmDefine(); |
457 #endif | 450 #endif |
458 }; | 451 }; |
459 | 452 |
460 struct TypeInfoStaticArrayDeclaration : TypeInfoDeclaration | 453 struct TypeInfoStaticArrayDeclaration : TypeInfoDeclaration |
464 #if IN_DMD | 457 #if IN_DMD |
465 void toDt(dt_t **pdt); | 458 void toDt(dt_t **pdt); |
466 #endif | 459 #endif |
467 | 460 |
468 #if IN_LLVM | 461 #if IN_LLVM |
469 void llvmDeclare(); | |
470 void llvmDefine(); | 462 void llvmDefine(); |
471 #endif | 463 #endif |
472 }; | 464 }; |
473 | 465 |
474 struct TypeInfoAssociativeArrayDeclaration : TypeInfoDeclaration | 466 struct TypeInfoAssociativeArrayDeclaration : TypeInfoDeclaration |
478 #if IN_DMD | 470 #if IN_DMD |
479 void toDt(dt_t **pdt); | 471 void toDt(dt_t **pdt); |
480 #endif | 472 #endif |
481 | 473 |
482 #if IN_LLVM | 474 #if IN_LLVM |
483 void llvmDeclare(); | |
484 void llvmDefine(); | 475 void llvmDefine(); |
485 #endif | 476 #endif |
486 }; | 477 }; |
487 | 478 |
488 struct TypeInfoEnumDeclaration : TypeInfoDeclaration | 479 struct TypeInfoEnumDeclaration : TypeInfoDeclaration |
492 #if IN_DMD | 483 #if IN_DMD |
493 void toDt(dt_t **pdt); | 484 void toDt(dt_t **pdt); |
494 #endif | 485 #endif |
495 | 486 |
496 #if IN_LLVM | 487 #if IN_LLVM |
497 void llvmDeclare(); | |
498 void llvmDefine(); | 488 void llvmDefine(); |
499 #endif | 489 #endif |
500 }; | 490 }; |
501 | 491 |
502 struct TypeInfoFunctionDeclaration : TypeInfoDeclaration | 492 struct TypeInfoFunctionDeclaration : TypeInfoDeclaration |
506 #if IN_DMD | 496 #if IN_DMD |
507 void toDt(dt_t **pdt); | 497 void toDt(dt_t **pdt); |
508 #endif | 498 #endif |
509 | 499 |
510 #if IN_LLVM | 500 #if IN_LLVM |
511 void llvmDeclare(); | |
512 void llvmDefine(); | 501 void llvmDefine(); |
513 #endif | 502 #endif |
514 }; | 503 }; |
515 | 504 |
516 struct TypeInfoDelegateDeclaration : TypeInfoDeclaration | 505 struct TypeInfoDelegateDeclaration : TypeInfoDeclaration |
520 #if IN_DMD | 509 #if IN_DMD |
521 void toDt(dt_t **pdt); | 510 void toDt(dt_t **pdt); |
522 #endif | 511 #endif |
523 | 512 |
524 #if IN_LLVM | 513 #if IN_LLVM |
525 void llvmDeclare(); | |
526 void llvmDefine(); | 514 void llvmDefine(); |
527 #endif | 515 #endif |
528 }; | 516 }; |
529 | 517 |
530 struct TypeInfoTupleDeclaration : TypeInfoDeclaration | 518 struct TypeInfoTupleDeclaration : TypeInfoDeclaration |
534 #if IN_DMD | 522 #if IN_DMD |
535 void toDt(dt_t **pdt); | 523 void toDt(dt_t **pdt); |
536 #endif | 524 #endif |
537 | 525 |
538 #if IN_LLVM | 526 #if IN_LLVM |
539 void llvmDeclare(); | |
540 void llvmDefine(); | 527 void llvmDefine(); |
541 #endif | 528 #endif |
542 }; | 529 }; |
543 | 530 |
544 #if DMDV2 | 531 #if DMDV2 |
549 #if IN_DMD | 536 #if IN_DMD |
550 void toDt(dt_t **pdt); | 537 void toDt(dt_t **pdt); |
551 #endif | 538 #endif |
552 | 539 |
553 #if IN_LLVM | 540 #if IN_LLVM |
554 void llvmDeclare(); | |
555 void llvmDefine(); | 541 void llvmDefine(); |
556 #endif | 542 #endif |
557 }; | 543 }; |
558 | 544 |
559 struct TypeInfoInvariantDeclaration : TypeInfoDeclaration | 545 struct TypeInfoInvariantDeclaration : TypeInfoDeclaration |
563 #if IN_DMD | 549 #if IN_DMD |
564 void toDt(dt_t **pdt); | 550 void toDt(dt_t **pdt); |
565 #endif | 551 #endif |
566 | 552 |
567 #if IN_LLVM | 553 #if IN_LLVM |
568 void llvmDeclare(); | |
569 void llvmDefine(); | 554 void llvmDefine(); |
570 #endif | 555 #endif |
571 }; | 556 }; |
572 #endif | 557 #endif |
573 | 558 |