Mercurial > projects > ldc
comparison dmd/declaration.h @ 663:6aaa3d3c1183
First part of rename to LDC.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Mon, 06 Oct 2008 22:46:55 +0200 |
parents | 8aebdf56c455 |
children | 06576ece1a1b |
comparison
equal
deleted
inserted
replaced
662:88e23f8c2354 | 663:6aaa3d3c1183 |
---|---|
327 void toObjFile(int multiobj); // compile to .obj file | 327 void toObjFile(int multiobj); // compile to .obj file |
328 virtual void toDt(dt_t **pdt); | 328 virtual void toDt(dt_t **pdt); |
329 | 329 |
330 virtual TypeInfoDeclaration* isTypeInfoDeclaration() { return this; } | 330 virtual TypeInfoDeclaration* isTypeInfoDeclaration() { return this; } |
331 | 331 |
332 // LLVMDC | 332 // LDC |
333 virtual void llvmDeclare(); | 333 virtual void llvmDeclare(); |
334 virtual void llvmDefine(); | 334 virtual void llvmDefine(); |
335 }; | 335 }; |
336 | 336 |
337 struct TypeInfoStructDeclaration : TypeInfoDeclaration | 337 struct TypeInfoStructDeclaration : TypeInfoDeclaration |
338 { | 338 { |
339 TypeInfoStructDeclaration(Type *tinfo); | 339 TypeInfoStructDeclaration(Type *tinfo); |
340 | 340 |
341 void toDt(dt_t **pdt); | 341 void toDt(dt_t **pdt); |
342 | 342 |
343 // LLVMDC | 343 // LDC |
344 void llvmDeclare(); | 344 void llvmDeclare(); |
345 void llvmDefine(); | 345 void llvmDefine(); |
346 }; | 346 }; |
347 | 347 |
348 struct TypeInfoClassDeclaration : TypeInfoDeclaration | 348 struct TypeInfoClassDeclaration : TypeInfoDeclaration |
349 { | 349 { |
350 TypeInfoClassDeclaration(Type *tinfo); | 350 TypeInfoClassDeclaration(Type *tinfo); |
351 | 351 |
352 void toDt(dt_t **pdt); | 352 void toDt(dt_t **pdt); |
353 | 353 |
354 // LLVMDC | 354 // LDC |
355 void llvmDeclare(); | 355 void llvmDeclare(); |
356 void llvmDefine(); | 356 void llvmDefine(); |
357 }; | 357 }; |
358 | 358 |
359 struct TypeInfoInterfaceDeclaration : TypeInfoDeclaration | 359 struct TypeInfoInterfaceDeclaration : TypeInfoDeclaration |
360 { | 360 { |
361 TypeInfoInterfaceDeclaration(Type *tinfo); | 361 TypeInfoInterfaceDeclaration(Type *tinfo); |
362 | 362 |
363 void toDt(dt_t **pdt); | 363 void toDt(dt_t **pdt); |
364 | 364 |
365 // LLVMDC | 365 // LDC |
366 void llvmDeclare(); | 366 void llvmDeclare(); |
367 void llvmDefine(); | 367 void llvmDefine(); |
368 }; | 368 }; |
369 | 369 |
370 struct TypeInfoTypedefDeclaration : TypeInfoDeclaration | 370 struct TypeInfoTypedefDeclaration : TypeInfoDeclaration |
371 { | 371 { |
372 TypeInfoTypedefDeclaration(Type *tinfo); | 372 TypeInfoTypedefDeclaration(Type *tinfo); |
373 | 373 |
374 void toDt(dt_t **pdt); | 374 void toDt(dt_t **pdt); |
375 | 375 |
376 // LLVMDC | 376 // LDC |
377 void llvmDeclare(); | 377 void llvmDeclare(); |
378 void llvmDefine(); | 378 void llvmDefine(); |
379 }; | 379 }; |
380 | 380 |
381 struct TypeInfoPointerDeclaration : TypeInfoDeclaration | 381 struct TypeInfoPointerDeclaration : TypeInfoDeclaration |
382 { | 382 { |
383 TypeInfoPointerDeclaration(Type *tinfo); | 383 TypeInfoPointerDeclaration(Type *tinfo); |
384 | 384 |
385 void toDt(dt_t **pdt); | 385 void toDt(dt_t **pdt); |
386 | 386 |
387 // LLVMDC | 387 // LDC |
388 void llvmDeclare(); | 388 void llvmDeclare(); |
389 void llvmDefine(); | 389 void llvmDefine(); |
390 }; | 390 }; |
391 | 391 |
392 struct TypeInfoArrayDeclaration : TypeInfoDeclaration | 392 struct TypeInfoArrayDeclaration : TypeInfoDeclaration |
393 { | 393 { |
394 TypeInfoArrayDeclaration(Type *tinfo); | 394 TypeInfoArrayDeclaration(Type *tinfo); |
395 | 395 |
396 void toDt(dt_t **pdt); | 396 void toDt(dt_t **pdt); |
397 | 397 |
398 // LLVMDC | 398 // LDC |
399 void llvmDeclare(); | 399 void llvmDeclare(); |
400 void llvmDefine(); | 400 void llvmDefine(); |
401 }; | 401 }; |
402 | 402 |
403 struct TypeInfoStaticArrayDeclaration : TypeInfoDeclaration | 403 struct TypeInfoStaticArrayDeclaration : TypeInfoDeclaration |
404 { | 404 { |
405 TypeInfoStaticArrayDeclaration(Type *tinfo); | 405 TypeInfoStaticArrayDeclaration(Type *tinfo); |
406 | 406 |
407 void toDt(dt_t **pdt); | 407 void toDt(dt_t **pdt); |
408 | 408 |
409 // LLVMDC | 409 // LDC |
410 void llvmDeclare(); | 410 void llvmDeclare(); |
411 void llvmDefine(); | 411 void llvmDefine(); |
412 }; | 412 }; |
413 | 413 |
414 struct TypeInfoAssociativeArrayDeclaration : TypeInfoDeclaration | 414 struct TypeInfoAssociativeArrayDeclaration : TypeInfoDeclaration |
415 { | 415 { |
416 TypeInfoAssociativeArrayDeclaration(Type *tinfo); | 416 TypeInfoAssociativeArrayDeclaration(Type *tinfo); |
417 | 417 |
418 void toDt(dt_t **pdt); | 418 void toDt(dt_t **pdt); |
419 | 419 |
420 // LLVMDC | 420 // LDC |
421 void llvmDeclare(); | 421 void llvmDeclare(); |
422 void llvmDefine(); | 422 void llvmDefine(); |
423 }; | 423 }; |
424 | 424 |
425 struct TypeInfoEnumDeclaration : TypeInfoDeclaration | 425 struct TypeInfoEnumDeclaration : TypeInfoDeclaration |
426 { | 426 { |
427 TypeInfoEnumDeclaration(Type *tinfo); | 427 TypeInfoEnumDeclaration(Type *tinfo); |
428 | 428 |
429 void toDt(dt_t **pdt); | 429 void toDt(dt_t **pdt); |
430 | 430 |
431 // LLVMDC | 431 // LDC |
432 void llvmDeclare(); | 432 void llvmDeclare(); |
433 void llvmDefine(); | 433 void llvmDefine(); |
434 }; | 434 }; |
435 | 435 |
436 struct TypeInfoFunctionDeclaration : TypeInfoDeclaration | 436 struct TypeInfoFunctionDeclaration : TypeInfoDeclaration |
437 { | 437 { |
438 TypeInfoFunctionDeclaration(Type *tinfo); | 438 TypeInfoFunctionDeclaration(Type *tinfo); |
439 | 439 |
440 void toDt(dt_t **pdt); | 440 void toDt(dt_t **pdt); |
441 | 441 |
442 // LLVMDC | 442 // LDC |
443 void llvmDeclare(); | 443 void llvmDeclare(); |
444 void llvmDefine(); | 444 void llvmDefine(); |
445 }; | 445 }; |
446 | 446 |
447 struct TypeInfoDelegateDeclaration : TypeInfoDeclaration | 447 struct TypeInfoDelegateDeclaration : TypeInfoDeclaration |
448 { | 448 { |
449 TypeInfoDelegateDeclaration(Type *tinfo); | 449 TypeInfoDelegateDeclaration(Type *tinfo); |
450 | 450 |
451 void toDt(dt_t **pdt); | 451 void toDt(dt_t **pdt); |
452 | 452 |
453 // LLVMDC | 453 // LDC |
454 void llvmDeclare(); | 454 void llvmDeclare(); |
455 void llvmDefine(); | 455 void llvmDefine(); |
456 }; | 456 }; |
457 | 457 |
458 struct TypeInfoTupleDeclaration : TypeInfoDeclaration | 458 struct TypeInfoTupleDeclaration : TypeInfoDeclaration |
459 { | 459 { |
460 TypeInfoTupleDeclaration(Type *tinfo); | 460 TypeInfoTupleDeclaration(Type *tinfo); |
461 | 461 |
462 void toDt(dt_t **pdt); | 462 void toDt(dt_t **pdt); |
463 | 463 |
464 // LLVMDC | 464 // LDC |
465 void llvmDeclare(); | 465 void llvmDeclare(); |
466 void llvmDefine(); | 466 void llvmDefine(); |
467 }; | 467 }; |
468 | 468 |
469 #if DMDV2 | 469 #if DMDV2 |
471 { | 471 { |
472 TypeInfoConstDeclaration(Type *tinfo); | 472 TypeInfoConstDeclaration(Type *tinfo); |
473 | 473 |
474 void toDt(dt_t **pdt); | 474 void toDt(dt_t **pdt); |
475 | 475 |
476 // LLVMDC | 476 // LDC |
477 void llvmDeclare(); | 477 void llvmDeclare(); |
478 void llvmDefine(); | 478 void llvmDefine(); |
479 }; | 479 }; |
480 | 480 |
481 struct TypeInfoInvariantDeclaration : TypeInfoDeclaration | 481 struct TypeInfoInvariantDeclaration : TypeInfoDeclaration |
482 { | 482 { |
483 TypeInfoInvariantDeclaration(Type *tinfo); | 483 TypeInfoInvariantDeclaration(Type *tinfo); |
484 | 484 |
485 void toDt(dt_t **pdt); | 485 void toDt(dt_t **pdt); |
486 | 486 |
487 // LLVMDC | 487 // LDC |
488 void llvmDeclare(); | 488 void llvmDeclare(); |
489 void llvmDefine(); | 489 void llvmDefine(); |
490 }; | 490 }; |
491 #endif | 491 #endif |
492 | 492 |
622 int canInline(int hasthis, int hdrscan = 0); | 622 int canInline(int hasthis, int hdrscan = 0); |
623 Expression *doInline(InlineScanState *iss, Expression *ethis, Array *arguments); | 623 Expression *doInline(InlineScanState *iss, Expression *ethis, Array *arguments); |
624 const char *kind(); | 624 const char *kind(); |
625 void toDocBuffer(OutBuffer *buf); | 625 void toDocBuffer(OutBuffer *buf); |
626 | 626 |
627 // LLVMDC: give argument types to runtime functions | 627 // LDC: give argument types to runtime functions |
628 static FuncDeclaration *genCfunc(Arguments *args, Type *treturn, char *name); | 628 static FuncDeclaration *genCfunc(Arguments *args, Type *treturn, char *name); |
629 static FuncDeclaration *genCfunc(Arguments *args, Type *treturn, Identifier *id); | 629 static FuncDeclaration *genCfunc(Arguments *args, Type *treturn, Identifier *id); |
630 | 630 |
631 Symbol *toSymbol(); | 631 Symbol *toSymbol(); |
632 Symbol *toThunkSymbol(int offset); // thunk version | 632 Symbol *toThunkSymbol(int offset); // thunk version |
633 void toObjFile(int multiobj); // compile to .obj file | 633 void toObjFile(int multiobj); // compile to .obj file |
634 int cvMember(unsigned char *p); | 634 int cvMember(unsigned char *p); |
635 | 635 |
636 FuncDeclaration *isFuncDeclaration() { return this; } | 636 FuncDeclaration *isFuncDeclaration() { return this; } |
637 | 637 |
638 // llvmdc stuff | 638 // LDC stuff |
639 | 639 |
640 // vars declared in this function that nested funcs reference | 640 // vars declared in this function that nested funcs reference |
641 // is this is not empty, nestedFrameRef is set and these VarDecls | 641 // is this is not empty, nestedFrameRef is set and these VarDecls |
642 // probably have nestedref set too, see VarDeclaration::checkNestedReference | 642 // probably have nestedref set too, see VarDeclaration::checkNestedReference |
643 std::set<VarDeclaration*> nestedVars; | 643 std::set<VarDeclaration*> nestedVars; |