Changeset 1523:833337c65fd3
- Timestamp:
- 07/06/09 18:54:02
(3 years ago)
- Author:
- Robert Clipsham <robert@octarineparrot.com>
- branch:
- default
- Message:
Fixed some unmerged parts of the D2 frontend.
Removed the automatic linker flags for D2 (temp).
Renamed a runtime function for D2.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| Revision 1465:dd72f56ad211 |
Revision 1523:833337c65fd3 |
| 8744 | e1->checkNoBool(); | 8744 | e1->checkNoBool(); |
|---|
| 8745 | type = e1->type; | 8745 | type = e1->type; |
|---|
| 8746 | typeCombine(sc); | 8746 | typeCombine(sc); |
|---|
| 8747 | e1->checkIntegral(); | 8747 | e1->checkIntegral(); |
|---|
| 8748 | e2 = e2->checkIntegral(); | 8748 | e2 = e2->checkIntegral(); |
|---|
| 8749 | //e2 = e2->castTo(sc, Type::tshiftcnt); |
8749 |
#if IN_DMD |
|---|
| 8750 | e2 = e2->castTo(sc, e1->type); // LDC |
8750 |
e2 = e2->castTo(sc, Type::tshiftcnt); |
|---|
| | |
8751 |
#elif IN_LLVM |
|---|
| | |
8752 |
e2 = e2->castTo(sc, e1->type); |
|---|
| | |
8753 |
#endif |
|---|
| 8751 | return this; | 8754 | return this; |
|---|
| 8752 | } | 8755 | } |
|---|
| 8753 | | 8756 | |
|---|
| 8754 | /************************************************************/ | 8757 | /************************************************************/ |
|---|
| 8755 | | 8758 | |
|---|
| … | | … | |
| 8773 | e1->checkNoBool(); | 8776 | e1->checkNoBool(); |
|---|
| 8774 | type = e1->type; | 8777 | type = e1->type; |
|---|
| 8775 | typeCombine(sc); | 8778 | typeCombine(sc); |
|---|
| 8776 | e1->checkIntegral(); | 8779 | e1->checkIntegral(); |
|---|
| 8777 | e2 = e2->checkIntegral(); | 8780 | e2 = e2->checkIntegral(); |
|---|
| 8778 | //e2 = e2->castTo(sc, Type::tshiftcnt); |
8781 |
#if IN_DMD |
|---|
| 8779 | e2 = e2->castTo(sc, e1->type); // LDC |
8782 |
e2 = e2->castTo(sc, Type::tshiftcnt); |
|---|
| | |
8783 |
#elif IN_LLVM |
|---|
| | |
8784 |
e2 = e2->castTo(sc, e1->type); |
|---|
| | |
8785 |
#endif |
|---|
| 8780 | return this; | 8786 | return this; |
|---|
| 8781 | } | 8787 | } |
|---|
| 8782 | | 8788 | |
|---|
| 8783 | /************************************************************/ | 8789 | /************************************************************/ |
|---|
| 8784 | | 8790 | |
|---|
| … | | … | |
| 9341 | if (e) | 9347 | if (e) |
|---|
| 9342 | return e; | 9348 | return e; |
|---|
| 9343 | e1 = e1->checkIntegral(); | 9349 | e1 = e1->checkIntegral(); |
|---|
| 9344 | e2 = e2->checkIntegral(); | 9350 | e2 = e2->checkIntegral(); |
|---|
| 9345 | e1 = e1->integralPromotions(sc); | 9351 | e1 = e1->integralPromotions(sc); |
|---|
| 9346 | e2 = e2->castTo(sc, Type::tshiftcnt); |
9352 |
//e2 = e2->castTo(sc, Type::tshiftcnt); |
|---|
| | |
9353 |
e2 = e2->castTo(sc, e1->type); // LDC |
|---|
| 9347 | type = e1->type; | 9354 | type = e1->type; |
|---|
| 9348 | } | 9355 | } |
|---|
| 9349 | return this; | 9356 | return this; |
|---|
| 9350 | } | 9357 | } |
|---|
| 9351 | | 9358 | |
|---|
| … | | … | |
| 9365 | if (e) | 9372 | if (e) |
|---|
| 9366 | return e; | 9373 | return e; |
|---|
| 9367 | e1 = e1->checkIntegral(); | 9374 | e1 = e1->checkIntegral(); |
|---|
| 9368 | e2 = e2->checkIntegral(); | 9375 | e2 = e2->checkIntegral(); |
|---|
| 9369 | e1 = e1->integralPromotions(sc); | 9376 | e1 = e1->integralPromotions(sc); |
|---|
| 9370 | e2 = e2->castTo(sc, Type::tshiftcnt); |
9377 |
//e2 = e2->castTo(sc, Type::tshiftcnt); |
|---|
| | |
9378 |
e2 = e2->castTo(sc, e1->type); // LDC |
|---|
| 9371 | type = e1->type; | 9379 | type = e1->type; |
|---|
| 9372 | } | 9380 | } |
|---|
| 9373 | return this; | 9381 | return this; |
|---|
| 9374 | } | 9382 | } |
|---|
| 9375 | | 9383 | |
|---|
| Revision 1484:7d3b47852a7a |
Revision 1523:833337c65fd3 |
| 309 | global.params.linkswitches->push(arg); | 309 | global.params.linkswitches->push(arg); |
|---|
| 310 | } | 310 | } |
|---|
| 311 | } | 311 | } |
|---|
| 312 | else if (!noDefaultLib) | 312 | else if (!noDefaultLib) |
|---|
| 313 | { | 313 | { |
|---|
| | | 314 | #if !DMDV2 |
|---|
| 314 | global.params.linkswitches->push(mem.strdup("-lldc-runtime")); | 315 | global.params.linkswitches->push(mem.strdup("-lldc-runtime")); |
|---|
| 315 | global.params.linkswitches->push(mem.strdup("-ltango-cc-tango")); | 316 | global.params.linkswitches->push(mem.strdup("-ltango-cc-tango")); |
|---|
| 316 | global.params.linkswitches->push(mem.strdup("-ltango-gc-basic")); | 317 | global.params.linkswitches->push(mem.strdup("-ltango-gc-basic")); |
|---|
| 317 | // pass the runtime again to resolve issues | 318 | // pass the runtime again to resolve issues |
|---|
| 318 | // with linking order | 319 | // with linking order |
|---|
| 319 | global.params.linkswitches->push(mem.strdup("-lldc-runtime")); | 320 | global.params.linkswitches->push(mem.strdup("-lldc-runtime")); |
|---|
| | | 321 | #endif |
|---|
| 320 | } | 322 | } |
|---|
| 321 | | 323 | |
|---|
| 322 | if (global.params.run) | 324 | if (global.params.run) |
|---|
| 323 | quiet = 1; | 325 | quiet = 1; |
|---|
| 324 | | 326 | |
|---|
| Revision 1512:09734fb929c0 |
Revision 1523:833337c65fd3 |
| 326 | llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname2, M); | 326 | llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname2, M); |
|---|
| 327 | } | 327 | } |
|---|
| 328 | | 328 | |
|---|
| 329 | // Object _d_allocclass(ClassInfo ci) | 329 | // Object _d_allocclass(ClassInfo ci) |
|---|
| 330 | { | 330 | { |
|---|
| | | 331 | #if DMDV2 |
|---|
| | | 332 | std::string fname("_d_newclass"); |
|---|
| | | 333 | #else |
|---|
| 331 | std::string fname("_d_allocclass"); | 334 | std::string fname("_d_allocclass"); |
|---|
| | | 335 | #endif |
|---|
| 332 | std::vector<const LLType*> types; | 336 | std::vector<const LLType*> types; |
|---|
| 333 | types.push_back(classInfoTy); | 337 | types.push_back(classInfoTy); |
|---|
| 334 | const llvm::FunctionType* fty = llvm::FunctionType::get(voidPtrTy, types, false); | 338 | const llvm::FunctionType* fty = llvm::FunctionType::get(voidPtrTy, types, false); |
|---|
| 335 | llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M) | 339 | llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M) |
|---|
| 336 | ->setAttributes(Attr_NoAlias); | 340 | ->setAttributes(Attr_NoAlias); |
|---|